I created a select action in *From in put array of object names Value and in *Map I put this expression
So I know that item() is returns the item that is in the array names Value but I want to get an index of each value in the array.
Is it possible to get index of each value in the array in the select action.
Thank you for the advice
Go to Solution.
Hi @pawelzebrowski ,
My idea is to add an index property into Array, which is a number that is incremented from 0. The following steps are for your reference.
1. initialize an integer variable to 0
2. create an Apply to each step to loop through each record within Array
3. add a compose step within apply to each, and put the following expression into Inputs field.
4. add a Set variable steps to make variable increment by 1
5. create a Select steps out of Apply to each loop, reference the output of compose step mentioned in step 3 in From field, then use item()?['index'] to get index of array.
Hope this helps.
View solution in original post
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.