Loop steps
This topic describes looping steps in Robots.
The following loop steps are available:
-
Query Database (also belongs to the Database category)
-
Iterate Directory (also belongs to the File System category)
-
JSON Loop (also belongs to the JSON steps category)
The following is common for all loop steps:
- All loop steps have an optional iteration variable.
- You can break out of loop steps using the Break step.
- You can skip to the next iteration using the Continue step.
Iteration variable
All loop steps have an optional iteration variable. This is an Integer variable that you can define in the step with the following characteristics.
- The initial value of the variable is 0, that is, during the first iteration the variable is 0.
- It is increased by one at the end of each iteration of the loop.
- The variable is local to the loop step and it is not accessible outside the loop.
- The variable is read-only, which means you cannot change it using the Assign step.
To refer to an iteration variable inside the loop, select Iteration Variable and enter the name of the variable to store the iteration.
Reference to previous finder
Starting with version 11.3.0, all previous finders are cleared at the start of a loop step body. If your robot containing loop steps is created with an earlier version of the product, we recommend that you replace any previous finders with named finders.