Exploring loops and types of loops
Loops are used to execute a given statement on repetitions based on a specific condition in an automation process. They are mainly used to automate repetitive automation tasks. The key loops in UiPath are Do While, While, and For Each. Let's explore these in turn.
Do While
The statements inside the Do While loop are executed first and then the execution is repeated until the specified condition is satisfied.
Example of a Do While loop
In this example, we will create a sequence that asks for an input number and then performs actions to output the value a set number of times. Let's get started:
- Create a New Blank Process from the New Project section in UiPath Studio and name it
DoWhile_Example
, as shown in the following screenshot: