web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Append to an array - a...
Power Automate
Unanswered

Append to an array - apply to each

(0) ShareShare
ReportReport
Posted on by

My goal is to update the Provider list with all the unique values from a corresponding column in a Staff list. So, if a provider has 10 staff and uniquely, they have 20 credentials, I want to update the provider list showing all the unique values of their 10 staff -- showing the 20 credentials.

I have a SharePoint provider list and a SharePoint staff list. The staff list has a lookup column to the Provider List. I would like to update a column in the Provider list based on unique values rolled up from the staff list. So, there needs to be an apply to each loop in order to get all the values from the staff, union them to get the unique values and then take that array and update the provider list.

Within the apply to each (parsing through the staff), I have...

A select statement that parses out the multi-select column from all staff assigned to the provider. (gets all service arrays)

A compose statement that does a union with the output from the previous select and the variable array. (varServiceArray) -- this is what I was hoping would append what is found with the next staff, appending to what was already assigned from all previous staff)

A set variable statement that is the outcome of the union compose.

Outside the apply to each, I have a compose statement that is merely the variable (varServiceArray) in the set within the apply to each.

Next is the update to the SharePoint list where I use the compose statement that is the total array.

The variable is then reset.

This is not working! The UNION step (what is found from the current staff and unions with the variable -- in hopes to continue appending all staff's details) is wrong.  

What I am hoping for is to find a provider, get all staff assigned to the provider, append all service arrays assigned to all staff, get unique values, then update the provider with the unique values of all staff assigned to them. 

Any suggestions?

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 103 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 87

#3
trice602 Profile Picture

trice602 63 Super User 2026 Season 1

Last 30 days Overall leaderboard