Branch Command
Description
The Branch Command Action can be used to change the execution of your script based on an expression or the value of a control. Note that this action references an open form or browse.
Procedure
On the first page of the Script Genie select a value from the Branch Expression is based on list.
If you selected "The Value in a Control on the current Form or Browse", choose a control from the Control Name list.
In the Branch Choices text box enter a list of choices, separated by line breaks.
Check the Include a default branch check box if you want to have default branch if the expression does not evaluate to any of your choices.
Click Next >.
Enter a unique name for the branch test in the Branch Name field.
For each choice, specify whether you want to play a script or set a variable to TRUE (.T.). By default, the Action is to set a variable to true. The variable name is a combination of the branch name and the option name. For example, if the branch is branch1 and the choice is New York, the variable will be called branch1_new_york and it will be set to .T. (TRUE). To play a script when a choice is TRUE, you must also specify the name of the script.For each entry in the If the expression evaluates to list select a value in the then ... list.
If you selected Include a default branch on the previous page of the genie, in the Default Action field specify what you would like to happen for the default branch. If a variable is set to TRUE, it will be called, branchname_else where branchname is the name of your branch.
Click Next >.
On the next page of the Script Genie optionally modify the default comment which describes the action.
Click Finish.
See Also