cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

Hi @Anonymous 

 

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

RusselThomas
Microsoft
Microsoft

Hi @Anonymous ,

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

Hi @Anonymous 

 

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

mdevaney
Super User III
Super User III

@Anonymous 

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

RusselThomas
Microsoft
Microsoft

Hi @Anonymous ,

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (37,925)