Creating or configuring forms > Adding a string decider

6.7 Adding a string decider

Whenever the XML allows a string decider (instead of a concrete string), these are the valid options:

To add a string decider

  1. Locate the UI component that holds a string (such as a text box or select box). Determine which operation to use.
  2. Configure a binary operation.
    1. Set the <calculate> element with the binary-operation attribute set to "substring".
    2. Set the <first> element to a string decider and the <second> element to an integer.
    3. <calculate binary-operation="substring">
        <first>
          <component id="payment-value" />
        </first>
        <second>3</second>
      </calculate>
  3. Configure another operation.
    1. Set the <calculate> element with the binary-operation attribute set to one of the following:
      • "int-to-string" – Evaluates the integer and takes the string value. Requires a child integer decider.
      • "double-to-string" – Evaluates a double decider and takes the string value. It requires a double decider. Optionally, you can use the precision attribute to specify how many decimal places to use in the result.
    2. (Optional) Use any of the following keywords to get specific strings:
      • "empty-string" – Returns an empty string
      • "space" – Returns a space

Related topics