cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Dynamically add list of persons to person/group column of file content type

I have a person/group column to a content type with multiple selection enabled.

 

I have a string that will have emails of users.

 

I want with update to add them all of them to the column. 

It is dynamical i do not have a fixed list.

 

When i add it statically it creates a list of object with property claims inside as

 

 

[
{
"Claims": "person1@email.com"
},
{
"Claims": "person2@email.com"
}
]

And this works properly.

 

But when i add the string with comma or semicolumn or space it does not work.

It creates only one object and in the claims property it places all string.

 

the peak code tells me that it places the next:

 

[
{
"Claims": "@items('Apply_to_each')['reviewer']"
}
]
How can i make this correct?
3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Dynamically add list of persons to person/group column of file content type

Hi @kpavlidis ,

 

Could you share the details of the Flow configuration and all the screenshots?

Since you need an array to configure the person/group field, you could consider putting the content to be filled first in an array variable.

The format is converted to an array by a variable, provided that the value of the variable is indeed an array.

Then configure the array variable in the person/group field.

Image reference:

6.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Dynamically add list of persons to person/group column of file content type

My problem is that i have a string that has the emails. 

 

So how from this string i can create this Array that you are creating statically?

Highlighted
Frequent Visitor

Re: Dynamically add list of persons to person/group column of file content type

Hi,

 

I might have a solution for you.

 

- First of all you have to parse the different mail into an Array

- Afterwards you have to iterate through this array and append the whole claim with the current item

- Then save it as a string

claim1.PNG

 

- Afterwards go to your "update action" and select via the icon on the right to "Switch to insert entire array"

- Then just convert your variable as json and you are done

- you do not have to care about commas or brakets

claim2.PNG

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (8,216)