Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I save results from an Apply to Each loop?

I need to loop through multiple SharePoint lists because of the current limiations of Flow's SharePoint actions. My issue is then taking the results of an Apply to Each loop and then combing them into a single list to do another Apply to Each loop against.


The first loop is getting the List Root Folder for multiple sites. Then those results need to be filtered down and looped over to get the contents of sub folders. This seems doable, but I need to filter the JSON from List Root Folder, then combine the results to an array so I can loop over it again...


Can the results of an Apply to Each loop be stored as a variable?

Community Support
Community Support

Hi @Anonymous,


Well, currently I don't think this is achieveable.

I think you have noticed that nested Apply to Each will not work.

And based on what I know, there should be no function available to add the item into an array.




Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,660)