cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Dual Super User III
Dual Super User III

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

Highlighted
Microsoft
Microsoft

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

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

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

Highlighted
Microsoft
Microsoft

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

Highlighted
Helper IV
Helper IV

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

@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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,522)