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
- Create an event, and add a Decision Branch action to it.
- (Optional) Type a name in the Name field to help identify the action.
- Click the Add Rule button and select an expression type.
This is the statement that must evaluate to true for the event to continue.
- Click OK to close the Add Rule dialog box.
- From the Event editor, click the Add Tests button.
- 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.
|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
- Right-click the selected data element and choose Compare with Constant.
- From the Constant dialog box, enter the value for the constant, then choose OK.
Do not use the following characters in your constants:
'. (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.)
- Click OK to close the Add Tests dialog box.
- 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."
||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.
- Click OK to close the Event editor.