Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Build a comma seperated list of a sharepoint People/Group field which allow multiple selection

(0) ShareShare
ReportReport
Posted on by 3,502

We have the following:-

 

1) SharePoint list which have a field of type People/Group which allow multiple selection

2) Planner

 

now we want to loop through all the SharePoint items >> and for each item >> to create a planner task >> assign the planner task to the users defined inside the People/Group field... but i am not sure how i can implement the scenario of building a comma separated list of a SharePoint People/Group field which allow multiple selection, so i can define this comma separated list inside the Assigned User Ids's planner field:-

 

johnjohn123_0-1657821333932.png

 

 

any advice?

Thanks

  • johnjohn123 Profile Picture
    3,502 on at
    Re: Build a comma seperated list of a sharepoint People/Group field which allow multiple selection

    I also try this workflow:-

     

    1) get all the SP items + initialize an array var

     

    c1.PNG

     

    2) initialize string var + loop through the SP items + build an array of the assigned users' emails 

     

    c2.png

     

    3) build a comma separated var string based on the array, add the string var to the create planner task:-

     

     

    c3.png

     

     

    but when i run the flow i got this error "The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each')' is of type 'Object'. The result must be a valid array.":-

     

    johnjohn123_0-1657831627579.png

     

    any advice?

  • johnjohn123 Profile Picture
    3,502 on at
    Re: Build a comma seperated list of a sharepoint People/Group field which allow multiple selection

    @Shujaath_Khan thanks for the info,, but i do not want to build the comma separated list for all the items.. i want to build a separate comma separated list for each item.. so the loop through the GetItems should build the comma separated list for all the users inside the item's People/Group field >> then create a planner task.. so at the end we will have a planner task for each SharePoint item, and both the item and the planner task will have the same assigned to users.. i hope this explain my case..

  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at
    Re: Build a comma seperated list of a sharepoint People/Group field which allow multiple selection

    Hi @johnjohn123 

    assume you're going to get the email id's as list

    Shujaath_Khan_1-1657822172019.png

    and compose expression example as below

    concat(items('Apply_to_each')?['Email'],';',variables('varEmailList'))

     

    Thanks
    Please click Accept as Solution on this reply if it helped to solve your issue, and thumbs-up if you feel this is useful or important in other ways as a boost.

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

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!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1