Creating conditional action listsAdded by IBM on August 31, 2010 | Version 1 (Original)
|You can use the Action Chooser to implement if/else statements within an action list.
You can use the Action Chooser to implement if/else statements within an action list.
If you plan on profiling the conditional statements, use the Conditional Action builder as it makes profiling the conditional action statements easier. Some things to keep in mind when using conditional statements in an Action List:
- You must include an EndIf statement for each If statement
- You can execute more than one model action in If and Else statements
- You can nest If/Else statements
To execute actions based on conditional logic:
- In the action list table, open the action chooser by clicking on the ellipsis (...) button.
- Expand the Special node.
- Expand the Conditional node and select the If element, launching the Define Conditional Action dialog.
- In the Value field of the Define Conditional Action dialog, use the Reference Chooser to specify the variable or method whose value will determine the actions to take.
- For the Comparison Type field, use the select box to choose one of the listed comparison types.
- If the Comparison Type uses two values (is less than, is equal to, and so on), a Comparison Value input appears. Use the reference chooser to select a variable or method whose value you want to compare to the value of the variable or method specified for the Value input.
Note: If the "is between" Comparison Type is selected, a second Comparison Value input is displayed.
- For the Comparison As field, specify how you want to compare the values of the Value and Comparison Type fields. Possible choices are:
The Action List builder call analyzes the two value types and performs the appropriate comparison.as strings
Compare the two values as strings.as case-insensitive strings
Compare the two values as strings, ignoring case differences.as numbers
Compare the two values as numbers.
Parent topic: Action List builder: wpf7