Use
the Loop
action to repeat a set of commands multiple times based on a specified
condition or over a collection of items. You can loop through various data structures such as
lists, tables, files, and more.
For example, you can use a loop to process each row in an Excel sheet, iterate through
files in a folder, or repeat actions a certain number of times. This helps in automating
repetitive tasks efficiently.
Procedure
To repeatedly run a sequence of actions, do the
following:
-
Double-click or drag the Loop
action from the Actions palette.
-
In the Label field, add a label for the specific loop action to identify your loop. For more information on loop labels, see
Labeling loops for automation control.
-
Select the Iterator option to repeat the sequence of
actions for a specific number of times.
-
From the Iterator list, select an option to specify
the number of times the sequence of actions must be
repeated. For more information regarding different iterator conditions to
control the iteration of loops, see Iterator-related conditions.
-
Select the While option to repeat the sequence of actions until a condition is met.
-
Select an option from the Condition list to specify
the condition.
-
To configure multiple While related conditions within
a single Loop
action:
- Click Add condition.
- Select either of the following options:
- And: Both the conditions must be met for
the actions to run.
- Or: Either of the conditions must be met
for the actions to run.
- Select the conditions from the drop-down list. For more information
regarding different conditions offered by the Loop
package, see While-related conditions.
-
To organize and manage multiple conditions or actions
within a loop:
- Click Add group.
- Click Add condition to configure a condition or
multiple conditions.
- Click Add group to add a group of multiple
conditions or actions.
-
Select the Check the condition at the end of the iteration
option to validate the condition at the end of each iteration. This option enables
you to ensure that the set of actions run at least one time, even
if the condition is not met.
Note: Insert the actions that you want to
repeat within the Loop.
- Optional:
Double-click or drag the Continue
action from the Loop
package to skip the current iteration and continue with the next
iteration of the loop.
-
Click Save.