Step-by-Step Guide to Use DoWhile to Make a Loop in Automation ProcessLet's create an example to automate the process till the condition is true. Once the condition is false, the loop ends. 1. Create a process. 2. In the Parameter bar, create an variable, A of Variable type - Int32 and set the Default field as 10.
3. From the Canvas Tools panel, add the While activity to the Flowchart designer on the Canvas. 4. In the Enter Expression here field, enter (A<20).
5. Double click the DoWhile activity box. 6. In the Drop activity here section, add the WriteLine activity to the Flowchart designer on the Canvas from the Canvas Tools panel. 7. In the Text field, enter "Value of A is : "+A.tostring. 8. From the Canvas Tools panel, add the Assign activity to the Flowchart designer on the Canvas. 9. In the To field, enter A. 10. In the Enter an Expression field, enter A+1.
11. Save the process. 12. Set up the environment and perform test run.
The console display the output till the value of A is lesser than 20 in ascending order. |
Related Topics |