Pre-General Availability: 2024-09-02
Add a Foreach Loop
When a robot must perform the same actions for multiple items, include the actions in a foreach loop. A foreach loop instructs a robot to iterate through a collection of items, one at a time. Provide the items to iterate upon using a variable collection.
Use Case
Consider an organization that needs to manually update several invoices every day. Within a robot, they create a foreach loop, which contains the actions for updating the invoices. The input for the robot is a variable collection, which contains the invoices that require updates.
Prerequisites
A foreach loop requires a collection variable, which is an array of values. In the use case above, the variable contains the invoice numbers that require updates. You can define the variable at any time, including while you're adding the foreach loop.
Add a Foreach Loop
Note:
You must use the low-code capabilities to add this logic to a robot. Keep reading for step-by-step instructions.