cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

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 II
Dual Super User II

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

Microsoft
Microsoft

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

4 REPLIES 4
Dual Super User II
Dual Super User II

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 III
Super User III

@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."

Microsoft
Microsoft

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

@RusselThomas - HOURS of searching and fumbling trying different things before finding your answer that gave me what I needed! Can't say how much of a roller coaster working with Power Apps is. Highs are some good feelings of accomplishments and lows are super lows with feeling about helpless because you just want one simple thing to work!!

 

Thanks again.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,963)