Index Variable
The index variable holds the current number of times a loop has executed. The iteration count starts at one the first time the loop is executed, and the count increases by one for each iteration of the loop.
You can access this variable like any other process data by referencing it with a dollar sign ($
) in front of it. For example, if the index variable is i
, and you want to specify a condition that the loop should execute three times (for a repeat until true loop), the condition would be $i=3
.
Note: For nested loops, the index of the contained loop resets at the beginning of each iteration of the parent loop.