Ok, so I'm passing an array in of emails to an apply to each. there is a correlated answer field in a SharePoint list that is correlated to each email by where they are in the array.
EX:
Array[1] = "Dudebro@gmail.com"
Answer_1 = "dudebro's answer"
so what I'm trying to do in the apply to each is find what the current index is and do something like
"Answer_" + Index
@RezaDorrani , I am using Apply To Each action and the concurrency is set to 10. I am using a Index variable and incrementing it to find out the current iteration value. In the loop, I have a condition when the Index variable value is 5, display the value in Compose. But due to the concurrency value, the loop iteration is at 40 when the index variable value is 5. which is not useful. I waned to get Loop Iteration value i.e. 40.
Please suggest, how to get the Loop Iteration value i.e. 40 when concurrency setting is on.
Documentation for iterationindexes states it only works in do until loops
So the apply to each loop will have to be changed to a do until loop to get the index
If you need in a apply to each loop, then one would have to create a variable and increment within the loop
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Hi @RezaDorrani
I was trying this expression earlier and couldn't figure out how to use it. Would it be possible to add an example specific to iterationIndexes?
This is what I tried.
Expression above I used is
iterationIndexes(items('Apply_to_each'))
Thanks
Hi @Anonymous
IterationIndexes will provide you the current index of the for loop
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2