Select Case |
Use the Select Case action to create one or more Case subactions and a single Default action and to specify a variable to evaluate to determine which of those actions to run. The Case and Default actions themselves are similar to the Group action in that they can contain any number of subactions that are run when the parent Case or Default action is run.
|
The Case and Default actions are the only subactions that are available for the Select Case action. However, the Case and Default actions can each have as many subactions as you require. |
You can configure the properties for the Select Case action on the following tabs.
Cases
Select case using variable: Specifies the name of the variable that you want to evaluate to determine which Case action to run. Enter a unique variable name that is used only for this action. Alternatively, click to expand the list and select a recently used variable, or add a variable.
Add Case: Click to add a new Case subaction to the Cases table. Also adds the Case action to the left navigation pane.
Cases table: Lists each of the Case actions that you create and the condition under which each of them runs.
|
You can also specify the condition for a Case action on the property page for the Case action itself. Click the Case action that you want in the left navigation pane to open its property page. Changes are updated on both the Case and the Select Case property pages. |
Case: The case name reflects the case condition.
Condition: Click to select the relational operator for the condition, and then enter the values for the condition.
: Deletes the Case action.
Specify default case for all other values: When you select this option, a Default subaction is added to the left navigation pane. This is a specialized action that does not include an option for specifying a condition. This is the action that runs when none of the conditions are met for the Case actions that you created.
Action
Name: A read-only property that specifies the name of the action. The variable that is listed in the name field is updated to the variable that you specify in the Cases section of the property page.
Description: Specifies a description for the action.
Run Action: Specifies how often you want the action to run.
Always: Specifies that the action runs each time the event occurs.
Never: Specifies that the action does not run when the event occurs.
Conditionally, based on variable: Specifies that the action runs only when a selected variable meets a specified condition. Use this option in situations in which there is only one condition that determines whether the action runs. After you select this option, you can create the conditional statement in the input box.
Variable: Specifies the variable that you want to use for the conditional statement. Enter the variable in the input box. Alternatively, expand the list and then click a recently used variable, or click Variables or More Variables to open the Insert Variable dialog.
[Relational Operator]: Specifies the relational operator to use for the conditional statement. Click the existing operator to open a list of additional operators, and then click the one that you want to use. For more information, refer to Relational Operators. The operators that are available in the list depend on whether you selected Text or Decimal for the Type option.
Value: Specifies the values to use for the conditional statement. To add a value, click , click <enter a value>, enter the value that you want, and then press Enter
. To delete a value, use the secondary mouse button to click it, and then click Delete. Some operators, such as Is blank and Is not blank, do not require a value to be specified. In these situations, the Value field is not available.
Type: Specifies whether the conditional statement is evaluating a text or decimal value.
Conditionally, based on expression: Specifies the conditions under which the action runs. Use this option for situations that require more than one conditional statement. When you select this option, you can create the conditional expression in the input box by creating the conditional statements that you want. You create and edit your conditional expression on the Tree View tab. Click the Text View tab to see a read-only text view of the conditional expression.
Input box controls (Tree View tab)
[Conditional Joiner]: Specifies the conditional joiner for the conditional statements within the group. The default conditional joiner is And.
Click the existing conditional joiner to access a menu that you can use to configure your conditional expression in one of the following ways:
And, Or, NotAnd, NotOr: Click the conditional joiner in the list that you want to use for the conditional statements. For more information about the supported conditional joiners, refer to Conditional Joiners.
Add Condition: Click to add another conditional statement to the current group.
Add Group: Click to add a subgroup of conditional statements to the current group.
Remove Group: Click to delete the subgroup. Available when you open the menu from a subgroup.
Clear All: Click to delete all conditional statements (including subgroups). Available when you open the menu from the top-most group.
: Visible to the right of each conditional joiner in your expression. Click to add a conditional statement to the group that is associated with that joiner.
: Visible to the right of an existing conditional statement when you point to the statement. Click to delete the conditional statement.
Variable: Specifies the variable that you want to use for the conditional statement. Enter the variable in the input box. Alternatively, expand the list and then click a recently used variable, or click Variables or More Variables to open the Insert Variable dialog.
[Relational Operator]: Specifies the relational operator to use for the conditional statement. Click the existing operator to open a list of additional operators, and then click the one that you want to use. For more information, refer to Relational Operators. The operators that are available in the list depend on whether you selected Text or Decimal for the Type option.
Value: Specifies the values to use for the conditional statement. To add a value, click , click <enter a value>, enter the value that you want, and then press Enter
. To delete a value, use the secondary mouse button to click it, and then click Delete. Some operators, such as Is blank and Is not blank, do not require a value to be specified. In these situations, the Value field is not available.
Type: Specifies whether the conditional statement is evaluating a text or decimal value.
Error Handling and Diagnostics
Ignore errors and continue running actions: Specifies that if the action fails, the remaining actions continue to run. When this option is not selected and the action fails, the resulting behavior depends on several factors, as follows:
The action is within a Group action
If you specified Sequentially for the Execute Actions property on the Group action's Execution tab, no further actions within that Group action are run. No actions outside of this Group action are affected.
If you specified In Parallel for the Execute Actions property on the Group action's Execution tab, the errors are ignored, and the other actions within that Group action are run. No actions outside of this Group action are affected.
The action is not within a Group action
If you specified Sequentially for the Execute Actions property on the event's Execution tab, no further actions within the event are run.
If you specified In Parallel for the Execute Actions property on the event's Execution tab, the errors are ignored, and the other actions within the event are run.