Exit Loop flow logic
Exit from a flow logic loop when the conditions of an If flow logic are met. Continue running the flow from the next step after the flow logic loop. This flow logic is also known as break.
Valid Exit Loop placement
- Then branch of an If flow logic block
- Then branch of an Else If flow logic block
- Then branch of an Else flow logic block
Inputs
This flow logic has no inputs.
Outputs
This flow logic has no outputs.
Execution Details
When a flow exits a loop, the state of the Exit Loop flow logic block becomes Completed. Any remaining steps in the For Each or Do the following until flow logic block aren’t run.
Exit a loop based on incident count
In this example, a flow generates a list of incidents assigned to a user. For each incident that is assigned to the user, the flow sends an email. If the list of incidents is greater than or equal to 5, then the flow exits the For Each flow logic loop and doesn’t send an email.
In this example, there are 19 incidents assigned to the user, which meets the exit conditions. The first item of the For Each flow logic counter shows the Exit Loop flow logic having a state of Completed.