Evaluate Dynamic Expression As Rule
- 20 May 2022
- 1 Minute to read
- Print
- DarkLight
Evaluate Dynamic Expression As Rule
- Updated on 20 May 2022
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Evaluate Dynamic Expression As Rule is a step available in the Flow Designer by navigating to DATA > NUMBERS in the Toolbox. This step will allow the user to enter a dynamic mathematical expression with a solvable outcome that will return a true or false result based on whether or not the expression is equal. The variable(s) used in the expression can be dynamically mapped to input data to evaluate against.
Example
- In a Designer Project, select the CREATE FLOW button from the top Action Bar.
- Select the Flow option at the top of the window that appears.
- Provide a name for the Flow then select CREATE.
- Locate the Toolbox in the Flow Designer and navigate to DATA > NUMBERS.
- Drag an Evaluate Dynamic Expression As Rule step between the Start and End step.
- Connect the outcome path of the Start step to the Rule step.
- Connect both paths of the Rule step to the End step.
- Select the SETUP INPUT DATA button and add a data member called Variable of the Int32type, it is not a list and does not allow null. Save the input data once complete and exit the window.Multiple pieces of input data can be added for the expression to evaluate and expression logic can be extended to handle that data.
- Select the Evaluate Expression Rule icon so that the Properties for this step appear.
- Navigate to the INPUTS section and select the Unknown mapping type next to Expression.
- Choose Merge Plain Text from the list and select SHOW EDITOR.
- When the Editor appears, hover over the Variable input data and select the plus symbol to add it in the space.
- After the Variable box, enter *2=10. This expression will now check the Int32 value used for Variable to see if it will multiply by 2 and equal 10.
- SAVE the Merge Text Editor after the expression is configured.
- Select the Debug button from the top Action Bar in the Flow Designer.
- In the Variable box, enter a number that will not equal 10 when multiplied by 2 to see that the false evaluation travels down the false path in the Flow.
- Select the Rule step icon and choose the first execution, then select View Input/Output Data to see the expanded results.
- Select CREATE NEW SESSION to run another test for a true evaluation.
- In the Variable box, enter 5 to see that the true evaluation travels down the true path in the Flow.
Was this article helpful?