cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Assign Array Elements

Hello,

 

I am trying to access the individual elements of an array and assign them to a new value. This is extremely simple in actual code, but I am not sure how to go about doing this in Microsoft Flow. Any help is greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Assign Array Elements

Sorry, here was the link I forgot to include.

https://powerusers.microsoft.com/t5/Building-Flows/Accessing-Array-elements/td-p/62134



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Assign Array Elements

Take a look at the solution in this thread.  It shows how to access individual array elements.  I've also done it with a Do until loop which has a current iteration value that increments during each loop.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Re: Assign Array Elements

I think I can access the array elements just fine. This involves using the square brackets as an operator to index into the array, so it would look something like variables('array_name')[index]. I am also not able to see what thread you are referring to or the link if you provided it, unfortunately.

The problem is, I need to be able to assign a value in the array to be a desired value, then later in the Flow access that value from the array. I suppose the problem here is that I do not know how to overwrite and store a value into an array at a specified index without appending it to the end. For assignment, I need to get the current array value, overwrite it to be the desired value, then store it back into the array. The first step I can do, but the other two are beyond me.

Dual Super User
Dual Super User

Re: Assign Array Elements

Sorry, here was the link I forgot to include.

https://powerusers.microsoft.com/t5/Building-Flows/Accessing-Array-elements/td-p/62134



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Anonymous
Not applicable

Re: Assign Array Elements

Thanks for providing that, it looks like it confirms my previous understanding of how to access an array element at a given index. Now I just need to figure out how to store a new value at that index for later usage.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,266)