Forum Discussion
Fail Activity
- 1 year ago
In Fabric pipelines, when using a ForEach loop in sequential mode, the default behavior is to continue executing iterations even if one fails. To stop execution when a failure occurs, follow these approaches:
Create a variable error (default value = 0).
Use an If Condition inside the ForEach loop:
If error == 0, execute the next iteration.
If error == 1, do nothing
Inside the if container (true). do the following:
Add an Execute Pipeline activity to call the inner pipeline
If the pipeline fails, set the error variable to 1.
Hi,
Just checking in as we haven’t received an update from you. If you're still experiencing the issue, feel free to share more details so we can continue assisting you.
If the problem has been resolved, and any of the replies here helped, please mark the appropriate one as the Accepted Solution so others can benefit.
Alternatively, if you found a different approach that worked, we’d appreciate it if you could share that here to support the community.
Thank you.