loop.md

‎ Loop

The Loop block creates an explicit loop in your flow, triggering its connected logic a defined number of times. It counts from a Minimum value to a Maximum value, incrementing by a configurable Step. On each iteration, the current counter is available as Current value, and when the loop is finished, the Completed connector indicates that no further iterations will run.

Fully expanded, the Loop block shows the following properties:

Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

Quick-start

  1. Drag Loop onto the canvas.
  2. Connect the block where you need repeated logic and set the basic parameters Minimum, Maximum, and Step to define how many times the loop should run.
  3. Run the flow when it's ready; use Current value inside the looped sequence and Completed to continue when all iterations are done.

Building block parameters

Parameters

When the loop finishes, Current value will be the last value used, typically the Maximum.

Resources

Topic Description
Flows FAQ Common questions about creating, running, and managing flows in Leapwork.
Flows Troubleshooting Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.