Probably simple, but I cannot find anything to help me with this. In short, I just want to extract information from a for each loop. I can't set variable within the loop (the updated value is local to the scope and doesn't persist once the loop ends) I can't extract information from a compose (again, data is local to the loop and inaccessible outside of it) and I'm running out of options. Something I haven't tried is using an array, but I would prefer to avoid that if at all possible. Any help would be appreciated!
Asked
Active
Viewed 195 times
0
-
Sorry, too ambiguous. Show us some data, your flow and what you expect as an outcome. Will be easier to help and be more specific with an answer. – Skin Jun 06 '23 at 20:42
1 Answers
0
How to extract information from for each loop in azure logic app
For that you can use Empty variable initialization before for each loops like below:
You can also use an empty array variable, here I have used string.
Then you can append or set this variable inside the for each loop like below:
As you havent provided input assuming an example input and output is:
You can also use compose and then set too like below:
Example references where i used for each loop and variables are ref1 and ref2.
This is the process where you are initializing variable globally and using it inside the loops and then doing the necessary actions on it.

RithwikBojja
- 5,069
- 2
- 3
- 7