cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kpavlidis
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
v-bacao-msft
Community Support
Community Support

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.

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?

GeorgiosG
Super User
Super User

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

Happy to help.
If I have answered your question, please mark your post as Solved.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,707)