Help Centre › Building Processes
This article describes the RPA Loop functionality to iterate over each item in a list.
For a full list of available functions, please read LOOP functions.
Description
The LOOP Each item in a list function allows you to iterate over each item in a comma or newline separated list of values. This is useful when you have a simple list of names, IDs, or other values and want to process each one individually.
Setting it up
To use the LOOP Each item in a list function, follow these instructions:
{{popups:rpas/add:action=loop-list}}
Once on a process map:
- Navigate to the process where you would like to add the LOOP Each item in a list function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the LOOP Each item in a list option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| List | Yes | Text | - | A comma or newline separated list of items, or a variable like {names} |
| Loop variable | Yes | Text | - | Variable name for the current item in each iteration |
| Max iterations | No | Number | - | Maximum number of iterations |
Output variables
| Variable | Type | Description |
|---|---|---|
| Loop variable | Text | The current item value in each iteration |
Errors
| Error | Description |
|---|---|
| Empty list | The list contains no items after splitting |
Tips
- Items can be separated by commas, newlines, or both
- Whitespace around each item is automatically trimmed
- Empty items are skipped
- You can use a variable like {names} that contains the list