Adding Decision Branches to Events

Use the Decision Branch action to add a conditional expression to an event that will run additional actions in the event when it evaluates to true. A Decision Branch action consists of at least one rule and one condition test. If the condition test meets the rule, the branch evaluates to "true," and the event continues by executing the subsequent action.

To add a decision branch to an event
  1. Create an event, and add a Decision Branch action to it.

  2. (Optional) Type a name in the Name field to help identify the action.

  3. Click the Add Rule button and select an expression type.

    This is the statement that must evaluate to true for the event to continue.

  4. Click OK to close the Add Rule dialog box.

  5. From the Event editor, click the Add Tests button.

  6. From the Add Tests dialog box, build a test that compares two operands to evaluate a condition.

    The operands can be fields on a host screen, values of controls on a form, constants you define — basically, any of the data elements available to your application at that time.

    Do this
    Convert both operands to numbers before comparing them
    • Under Type, click the value field, and then select Numeric.
    Change the operator to a different value
    • Under Operator, click the value field, and select the operator you want from the drop-down list. (Default: Equals.)
    Compare an operand to a constant you define
    1. Right-click the selected data element and choose Compare with Constant.

    2. From the Constant dialog box, enter the value for the constant, then choose OK.

      Do not use the following characters in your constants: +, -, \, /, (, ), or '. (The expression evaluator treats these characters in a particular way; therefore, they cannot be used as part of constant values in a test condition of a decision branch step.)

  7. Click OK to close the Add Tests dialog box.

  8. From the Event editor, add one or more sub-actions to the Decision Branch action.

    The sub-actions in the branch are like any other action, except that they will only occur if the Decision Branch expression evaluates to "true."

    Note When the execution thread of an event reaches a Display Form action, the event will finish. This is true even when the Display Form action is in the branch.

    If there is no Display Form inside the branch, the execution thread will come out of the branch and continue with the action immediately below the Decision Branch when it has finished with all actions inside the branch.

  9. Click OK to close the Event editor.

Related Topics
Bullet Adding Events, Overview
Bullet Adding Events to Controls
Bullet Adding Actions to Events
Bullet Action Descriptions: Decision Branch