You can set conditions on a step level. There is a property in a step condition, which grabs a parameter from the User action (as a variable) and based on its value (true/false) executes or skips the step:
“True”, “true” or undefined (no value) will execute the step;
“False” or “false” will skip the step.
Background
This feature can be used in case need to skip one or more steps based on a certain condition in one of the previous steps.
Procedure
Record your flow
Export as a Variable the value from the step, which you want to be used as a condition (the value has to be true or false);
Enable a CONDITIONAL EXECUTION switch for the step/steps you want to execute or skip based on a condition, defined in a Variable earlier.
Expected values in the Data Set are “True”/undefined or “False”:
True”, “true” or undefined (no value) will execute the step;
“False” or “false” will skip the step.
Example:
Use Case 1
Challange
User needs to verify if there is a value in the text field:
If there’s no value or the value is not equal to the parameter value in the Data set → skip certain step(s)
If the value equals the parameter value in the Data set → proceed with the next step
Steps
Complete the steps from the Procedure section
Go to the Verify/Store step and change the User Action to Custom
Add the following code and hit Save:
if(obj.innerText == null || obj.innerText != param) { return false; } return true;
Where you need to define the correct property for your object here: obj.innerTex
Use Case 2
Challange
User needs to verify if there is a value in the text field:
If there’s no value or the value is not equal to the parameter value in the Data set → skip certain step(s)
If the value equals the parameter value in the Data set → change the value in the input field to the one in the Data set and proceed with the next step
Steps
Complete the steps from the Procedure section
Go to the Verify/Store step and change the User Action to Custom
Add the following code and hit Save:
if(obj.innerText == null || obj.innerText != param) { obj.innerText = param; return false; } return true;
Where you need to define the correct property for your object here: obj.innerTex
Comments
0 comments
Please sign in to leave a comment.