Specify Conditions

Conditions let you configure an If/Then/Else condition to trigger an action or connector call for a control’s selected event or a control’s specified action.

To specify conditions for a control:
  1. Select a control on the form canvas and specify an event for it. See Configure Events.
  2. Click the event editing icon adjacent to the Event field.

    The event window displays with the selected event option (for example, On Load) at the top, and color coded buttons for adding actions, conditions, or connectors to the event.

  3. Click +If to add a condition.

    Multiple items display to help you construct and complete the condition.

    • Solid blue If, Then, and Else indicators signal each portion of the condition to complete.

      The Summary field below the If indicator displays a compact version of the condition you'll define. Use the button at the end of this field to collapse or expand the conditions editor.

    • Use the +Condition, +Action, +Else If, and +Else Action buttons to add additional conditions or actions to the condition.

    • Use the fields displayed under the If or Else If indicators to define conditional behavior.

  4. Complete the If portion of the condition.
    1. Select a type from the Type field and complete fields that display. Select from these options:
      • Constant lets you specify a value for the selected control. Be sure to specify the corresponding value in the Value field.

      • Data Definition lets you use the data from the payload. When you click the adjacent Value field that displays, available items are listed.

      • Control lets you use the data from a control. Be sure to select the control name and property to use.

        Properties are control specific. For example, some controls, such as the number control, have many properties as options. Other controls, such as the image control, only have one property: Hidden. Email and phone controls have a property Placeholder but don't have the Min Value and Max Value properties.

      • Function lets you perform common operations with strings, values and arrays, as described in Specify Functions.

      • Connector Data lets you assign a value from a connector call made from the same event.

    2. Select an operation. For example, choose is True from the drop-down field.

      Tip:

      To check for a null value, choose is False; if a control has no value, the condition result returns true. Conversely, choose is True to check that a property is present.

      Note:

      You can also check if a particular property, such as value, of a control is empty or not using the is empty operation. Controls of array type (repeatable sections or tables) are considered empty if the array is empty. A check box or a checklist is considered empty if no selection is made.
    3. Based on the selected operation, complete a second Type field and additional fields that display. You must specify a type and additional fields for all operations except when is True or is False are selected.
    4. To add another condition, click +Condition, specify if it's an And or an Or condition and configure it.

      For example, as shown in the figure, you can configure a condition for the Cost control field of a travel request form such that if cost is greater than 5000 and the duration of travel is less than 14 days then you can set further Then or Else conditions to be triggered.


      Description of add-another-if-condition.png follows
      Description of the illustration add-another-if-condition.png

  5. Complete the Then portion of the condition by clicking +Action and completing the action. See Specify Actions.

    For example, for the Cost control of a travel request form if the cost is greater than 5000 and the number of days of travel is less than 14 then the Justification field is required in the form.

    Description of then-condition.png follows
    Description of the illustration then-condition.png

  6. Complete the Else portion of the condition by clicking +Else Action and completing the action.

    For example, for the Cost control of a travel request form if the cost is greater than 5000 and the number of days of travel is less than 14 then the Justification field is required in the form else it's optional.


    Description of else-condition.png follows
    Description of the illustration else-condition.png

  7. If needed, add and configure additional If/Then/Else conditions.

    Note:

    In the event window, use the Undo or Redo buttons to remove or restore recent changes to conditions. Use the delete icon to delete a condition. Use up and down arrows to reorder conditions within the window. Click Cancel to exit the event window without saving changes.
  8. After completing the event, click OK, then Save.