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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard