How to repeat a sequence of steps n times in UiPath
In some business processes, we need to perform certain steps over and over again to get the required output.
While designing the process automation let’s say you need to repeat a sequence of steps n number of times.
In this article, let’s see how we can achieve this task using UiPath Studio.
Let’s jump into the practical implementation of this task:
Step1: Drag and Drop Repeat Number of Times activity from activities panel to designer panel as shown below:
The below image shows the properties of this activity:
Let’s see the required properties for this activity:
- Number Of Times – If you want to repeat the steps n times then provide the value of n as integer. (eg: 1,2,3….)
- Start at – Provide an integer value that is used as number to start from and the currentItem holds that value.
The below image shows us the example that we are going to discuss:
In this example let’s say you want the steps inside that Do block to execute three times.
Basing on that it will repeat the steps three times. But what is the importance of CurrentItem value starts from the value that is provided in start at property.
Basing on the above image the initial CurrentItem is shown below:
This is how we can repeat a sequence of steps n number of times.