Skip to main content
Roberty Studio
RPAMy robot

Loop

Loop

Repeats a block of actions a set number of times. On each pass the internal counter goes up, and it is available as an output to the actions inside.


Options​

Repeat how many times​

How many times the inner block of actions runs. It has to be a whole number greater than zero. It takes a fixed value, another action's output, code or a variable.

Returns​

Javascript code​

js
actions["action-id"].count // the current iteration's number (Number)

Field selection​

  • count — the current iteration's number, starting at 1 and going up on each pass (Number)

Rules and conditions​

  • Repeat how many times is required and has to be greater than zero.
  • The count output can be used by any action inside the loop's block to know which iteration the robot is on.
  • To break out before every iteration has run, use Exit the loop.
  • To skip to the next iteration without running the rest of the block, use Next iteration.
  • To change the counter's value programmatically while it runs, use Change the loop counter.