Showing results for 
Search instead for 
Did you mean: 

Exit from "Apply to Each"

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.



Yoshihiro Kawabata

Status: Under Review

Thank you for suggesting this idea, it is a good suggestion!

Level: Powered On

How did nobody not think of this? Really?

I have 3000 items, I found match at ID 2, flow still goes through 2998 items. The heck?

Level: Powered On

@rcdf  Yeah I don't know what @Stephen is going on about.

Do until will apply a something until a condition is met. Awesome! What if I don't want that condition to applied? Which in that case we are back to condition checking.


First things you learn in programming is getting out of loops and this dude is talking about "voted" on features. Dude, this is a necessary thing that should have come with the loops in the first place.


Why am I checking 3000 items when I found my match at 1? Doesn't match any sense

Level: Powered On

@mykelboachie - Yep. The only viable idea I have seen to date was to use a Filter command to pare down the results to a smaller dataset ahead of time to reduce the volume of processing.


Side note, I still have to go back and use SP Designer for very simple workflows that would otherwise create an infinite loop in Flow. Seriously, like basic 1 liner workflows for each time a list item is created then update  column X to some value. 

Level: Powered On

@rcdf  Thanks, this is crazy.. Unfortunately In my case, I can't really filter down since I need everything in there updated. It just drives me insane cos some of them are matching at 4, yet it goes down the whole 3000 list items for each 1 item in sql list. Yikes!

Level: Powered On

There could be a workaround butbut I haven't triedtried it.


You can filter the array.

See veenstra's amazing blog. Where would Flow be without  it