cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kpavlidis
Level: Powered On

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
Community Support Team
Community Support Team

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.
kpavlidis
Level: Powered On

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?

GeorgiosG
Level: Powered On

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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 367 members 5,295 guests
Please welcome our newest community members: