I want to exit from "Apply to Each" for exit the loop.
In some case, the loop does not need processing items after specific item.
Thank you for suggesting this idea, it is a good suggestion!
2017 ... well it's a basic fonction ... and it's not already implemented ? Just to search a similar fonction it takes many time and to make it work like a break take also a lot of time, the code is long and complicate for nothing...
It's just a "break" 4 years to implent this simple fonction ?
This is much needed.
Lets make Power Automate Great!
NEEDED! I have set "Wait for an approval" inside an "Apply to each" with parallelism and if a user rejects, I cannot escape now. Not sure yet how to overcome this. Why is it so completed to allow the TERMINATE action inside this loop?
Really, 3 years "under review" for something that is not only essential, but would benefit MS as well by reducing unnecessary data load?
I have a SharePoint list of 5000 rows and using that to find something specific in my database.
I add an Apply to Each loop and enumerate the list
Found the information in the first row
I need to continue with the rest 4999 records, because I cannot exit the loop.
You can use the filter ODATA when you use "get item" (i think you use this function to get yours items on your flux, it can directly reduce the number of row which are in the For each loop), and i think for MS it's not sooo important because with many functions you can "recreate" a similar break function...
@CanardWC Was just an example. And there's simple just no way to exit from the All items loop and also no reason why not implementing this. The best workaround is to place a condition inside the loop like "if found then/else" and place the rest to the "not found" path. But it will still enumerate the whole collection, just won't do anything.
Adding my voice to this thread that this is much needed functionality. I'm building a flow that will update many records. Would like to exit the loop if I exceed a certain number of failures, but without being able to terminate within a loop I'm stuck to let every single record fail instead of catching and exiting gracefully. It's a real shame it's taking so long to see any movement on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.