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

Reading values in a comma-separated string from a sharepoint lists multivalued person or group field

Hi,

 

I have a sharepoint list which has a Person or Group field that accepts multiple values. how can i get a comma seperated emails of all the people in this column.

 

thanks,

-Dileep

2 ACCEPTED SOLUTIONS

Accepted Solutions
Dual Super User
Dual Super User

Re: Reading values in a comma-separated string from a sharepoint lists multivalued person or group field

Hi @dileeprajam 

 

In that case, please use the below expression:
 
Concat(Lookup(DataSource, Col1 = "Value1").MultiSelectColumnName, Email, ",")
 
Here, highlighted part needs to be replaced with the expression that returns the column value of a specific item. If this is inside gallery, replace the highlighted part with ThisItem.MultiSelectColumnName
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Super User
Super User

Re: Reading values in a comma-separated string from a sharepoint lists multivalued person or group field

Hi @dileeprajam ,

The Person or Group column entries are complex objects, hence you have a few replies on this, depending on what you're trying to do 🙂

You may need to navigate the object to a specific property in order to get to the email - as others have indicated you can achieve this using .Email as a property navigation of the object.

However, this only applies to single entry persons - each entry is a nested Table of properties, so navigating to one is easy enough.  If, however you are using multiple entries per row - then these are nested Tables within each row, and you'll need to iterate through all of them per row to get all entries in the column.

If it's just one entry per row, the previous responses should apply.

If it's multiple entries per row, then the question is, are you looking for all the entries in one row, or all the entries in all rows?

Assuming all entries in one row - and that your datasource is called "personlist" and your person column is "multipersons":

 

Concat(LookUp(personlist, rowcondition, multipersons), Email,",")))

Where rowcondition would be the condition you use to find your row - this will return the emails of all the persons in that row.

 

Assuming all entries in all rows - try set a Label Text: property to;

 

Concat(
    ForAll(
        ForAll(
            personlist,
            multipersons
        ),
        Concat(
            Value,
            Email,
            ","
        )
    ),
    Value,
    ","
)

The reason this looks so complicated is that for each row, we need to go through each multiperson entry for that row, and do this for all rows.  For connected datasources, also remember your row return and delegation limits may apply.

Hope this helps,

RT

 

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: Reading values in a comma-separated string from a sharepoint lists multivalued person or group field

Hi @dileeprajam 

 

In that case, please use the below expression:
 
Concat(Lookup(DataSource, Col1 = "Value1").MultiSelectColumnName, Email, ",")
 
Here, highlighted part needs to be replaced with the expression that returns the column value of a specific item. If this is inside gallery, replace the highlighted part with ThisItem.MultiSelectColumnName
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Super User
Super User

Re: Reading values in a comma-separated string from a sharepoint lists multivalued person or group field

@dileeprajam 

Assuming Employee is the name of your person or group column this code will give you a comma separated values list.

 

Concat(your_datasource_name,Employee.Email,", ")

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

Super User
Super User

Re: Reading values in a comma-separated string from a sharepoint lists multivalued person or group field

Hi @dileeprajam ,

The Person or Group column entries are complex objects, hence you have a few replies on this, depending on what you're trying to do 🙂

You may need to navigate the object to a specific property in order to get to the email - as others have indicated you can achieve this using .Email as a property navigation of the object.

However, this only applies to single entry persons - each entry is a nested Table of properties, so navigating to one is easy enough.  If, however you are using multiple entries per row - then these are nested Tables within each row, and you'll need to iterate through all of them per row to get all entries in the column.

If it's just one entry per row, the previous responses should apply.

If it's multiple entries per row, then the question is, are you looking for all the entries in one row, or all the entries in all rows?

Assuming all entries in one row - and that your datasource is called "personlist" and your person column is "multipersons":

 

Concat(LookUp(personlist, rowcondition, multipersons), Email,",")))

Where rowcondition would be the condition you use to find your row - this will return the emails of all the persons in that row.

 

Assuming all entries in all rows - try set a Label Text: property to;

 

Concat(
    ForAll(
        ForAll(
            personlist,
            multipersons
        ),
        Concat(
            Value,
            Email,
            ","
        )
    ),
    Value,
    ","
)

The reason this looks so complicated is that for each row, we need to go through each multiperson entry for that row, and do this for all rows.  For connected datasources, also remember your row return and delegation limits may apply.

Hope this helps,

RT

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,707)