Creating or configuring forms > Setting a Boolean decider

6.8 Setting a Boolean decider

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

To set a Boolean comparison operation to compare dates or strings

  1. Locate the UI component to hold the comparison operation.
  2. Set the <requirement> element with the comparison attribute set to one of the following:
  3. Option Description
    "equal" Evaluates to true only if the first and second values are equal
    "lessthan" Evaluates to true only if the first is less than the second
    "greaterthan" Evaluates to true only if the first is greater than the second
    "not" Evaluates to true only if the first is NOT equal to the second
  4. Specify whether this is a string or a date by setting the type attribute of <comparison> to either "string" or "date". Not setting type causes Viewpoint to assume "string".
  5. Set the <first> and <second> elements within <requirement> to the values to be compared. These can be deciders themselves.
  6. <requirement comparison="equals">
      <first>
        <component id="procs" />
      </first>
      <second>1</second>
    </requirement>

    The requirement evaluates to true if the value in the "procs" component is equal to 1.

To set a boolean decider to perform a logical operation

  1. Locate the UI component to hold the comparison operation.
  2. Set the <requirement> element with the logical-operation attribute set to one of the following:
  3. <requirement logical-operation="or">
      <value>
        <component id="test_vlan" />
      </value>
      <value>
        <component id="dev_vlan" />
      </value>
    </requirement>

    The requirement is evaluated to true if either the "test_vlan" or "dev_vlan" components are true.

Related topics