For Loop icon

For Loop

Creates a fixed-count loop. Runs the Loop branch N times, then exits through the Done branch.

For Loop

AI-generated

Summary

Create a fixed-count loop that runs the loop output branch a specified number of times before exiting through the done output branch.

Inputs

  • Number of Iterations (required) — Specify how many times the loop branch should run; must be a number greater than or equal to 1.

Output shape

Two outputs: the first (loop) outputs the input items one by one for the number of iterations specified, and the second (done) outputs the original input items after all iterations complete.

On each execution, the node outputs the input data to the 'loop' output if the current iteration count is less than or equal to the specified number of iterations. After reaching the count, it outputs to the 'done' branch exactly once. The iteration count is managed internally via static node data and resets after completion.

Examples

Example 1: Looping 3 times

Set Number of Iterations to 3 to run the loop branch exactly three times before the done branch is triggered.

Discussion