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
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.