Skip to main content

Break loop

Sophie avatar
Written by Sophie
Updated over 2 months ago

Definition and Usage

The Break loop command allows you to exit the current loop immediately. When executed, this action causes the workflow to break out of the innermost loop that contains it, and continue execution with the next action after the loop.


Parameter Values

Input parameters

This command does not require any input parameters.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

While this command doesn't accept parameters, it is typically used within conditional structures. You can use variables in the condition that determines whether to execute the Next loop command:

  • Place this command inside an If condition block to exit current loop based on specific criteria

  • Variables used in the conditional statement should be properly defined before the loop starts


Notes

  • This command can only be used within a loop structure. Using it outside of a loop will result in an error.

  • When used in nested loops, the Break loop command will only exit the innermost loop that contains it.

  • This command is useful when you need to terminate a loop early based on certain conditions.

  • Consider using this command with conditional actions to create exit conditions for your loops.

  • Unlike Next loop, which skips to the next iteration, Break loop completely exits the loop.

Did this answer your question?