Skip to main content
Community site session details

Community site session details

Session Id : nvJk1NveKCovFFFpyRymeU
Power Automate - General Discussion
Unanswered

Unable to append to array

Like (0) ShareShare
ReportReport
Posted on 12 Dec 2022 10:47:02 by 376

Hi, i have a sharepoint list which stores the following information 

 

Title    |  Value     |  Approver   |   Status

 

The Approver is a choice column that a user must select.  A user can select Multiple Approvers. 

 

I have the approval all working fine.. 

 

Now i would like to send a reminder to the approvers in case the status is still Pending. 

 

I have started to write my flow to get me all items where Status = Pending. All Working 

 

I am stuck on getting the approver into an array.  

 

There could be several items in that sharepoint list that have user joe.bloggs@domain as the approver.... So i would like to get a list of all the approvers and then someone how a union on them so i get a distinct list of approvers who status is pending. 

 

I initialized a variable of type array. .
When i apply to each SharePoint value, i use the Select statement to give me the approve value. 

 

I then try to append the approver value from the select statement to an array, but this fails as below

Vstar19_2-1670842117077.png

 

The value '["joe.bloggs@domain.com","john.smith@domain.com"]' of type 'Array' cannot be appended to the variable 'Approvers' of type 'Array'. The action type 'AppendToArrayVariable' only supports values of types 'Float, Integer, String, Boolean, Object'.

 

The aim is to get all the approvers into a varaible so i can run a union to get a distinct number of approvers who have not approved, then send them an email asking them to approve. 

 

Can someone please help?

 

Thanks

 

 

 

  • Expiscornovus Profile Picture
    32,169 Most Valuable Professional on 12 Dec 2022 at 12:12:09
    Re: Unable to append to array

    Hi @Vstar19,

     

    You could also use a compose with in the loop and use the union function in there. After that you can use the outputs of that compose in a set variable action, instead of a append to array variable action.

     

    Below is an example of that.

     

    setvariable_uniqueapprovers_union.png

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete