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

Displaying a Name from a SharePoint List Column, That Uses "Person or Group" Type, In a PowerApp Gallery

I am having some difficulty with my gallery in that I cannot display the data from my SharePoint List that uses a "Person or Group" type column. I thought it would just be like the rest of the fields, where we use "ThisItem.'Owner Name'.DisplayName", but when I do this is get the error "Expected Text Value". The display field is just a label to align with everything else I have in the gallery. This gallery is just a read only one so having the user interact with a combobox or something would not work. I am truly baffled by this as I am sure there is something simple that I am overlooking. Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Displaying a Name from a SharePoint List Column, That Uses "Person or Group" Type, In a PowerApp Gallery

HI @McG ,

Do you enable the "Allow Multiple Selections" option for the Owner Name column (Person column) in your SP List?

Do you want to display the Owner Name column value within your app?

 

If you enabled the "Allow Multiple Selections" option for the Owner Name column (Person column) in your SP List, I think there is something wrong with the formula that you provided.

 

If you enabled the "Allow Multiple Selections" option for the Owner Name column, the result the ThisItem.'Owner Name'.DisplayName returned is a Table value, but the Text property of the Label in your Gallery is required to provide a Text value.

I have made a test on my side, please consider take a try with the following workaround:9.JPG

Within the Gallery, set the Text property of the Label to following:

Concat(ThisItem.Executor, DisplayName & ";")

On your side, you should type:

Concat(ThisItem.'Owner Name', DisplayName & ";")

More details about the Concat function, please check the following article:

Concat function

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 REPLIES 6
Super User
Super User

Re: Displaying a Name from a SharePoint List Column, That Uses "Person or Group" Type, In a PowerApp Gallery

I suspect your problem is that the SharePoint column allows multiple selections. As a result your formula would bring back a collection of Display Names and not a single display name. An easy way to check would be to put a First() function around the thisItem.'Owner Name'.  That will force it to only bring back the first record.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
McG
Level: Powered On

Re: Displaying a Name from a SharePoint List Column, That Uses "Person or Group" Type, In a PowerApp Gallery

I don't believe that this is the solution that I am looking for as there is still an error with "Expected Text Value".  I would not know how to make "First" work in a gallery as, even if it did work, it would only return the value from the first row from SharePoint for all 200+ items in the gallery.  I could be completely wrong on this as I am quite green in PowerApps. 

McG
Level: Powered On

Re: Displaying a Name from a SharePoint List Column, That Uses "Person or Group" Type, In a PowerApp Gallery

So I did test turning off allowing multiple selections and it did work. For my current project it will suffice but for future users I will leave this open hoping someone can provide a solution to having multiple selections enabled on a SharePoint list in a people list. 

Super User
Super User

Re: Displaying a Name from a SharePoint List Column, That Uses "Person or Group" Type, In a PowerApp Gallery

In this case First would return the first matching value from the multiple values in the column, and wouldn't have any effect on the individual records in the gallery.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Displaying a Name from a SharePoint List Column, That Uses "Person or Group" Type, In a PowerApp Gallery

HI @McG ,

Do you enable the "Allow Multiple Selections" option for the Owner Name column (Person column) in your SP List?

Do you want to display the Owner Name column value within your app?

 

If you enabled the "Allow Multiple Selections" option for the Owner Name column (Person column) in your SP List, I think there is something wrong with the formula that you provided.

 

If you enabled the "Allow Multiple Selections" option for the Owner Name column, the result the ThisItem.'Owner Name'.DisplayName returned is a Table value, but the Text property of the Label in your Gallery is required to provide a Text value.

I have made a test on my side, please consider take a try with the following workaround:9.JPG

Within the Gallery, set the Text property of the Label to following:

Concat(ThisItem.Executor, DisplayName & ";")

On your side, you should type:

Concat(ThisItem.'Owner Name', DisplayName & ";")

More details about the Concat function, please check the following article:

Concat function

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
McG
Level: Powered On

Re: Displaying a Name from a SharePoint List Column, That Uses "Person or Group" Type, In a PowerApp Gallery

This is the solution that I was looking for! Amazing.  Thank you very much

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 177 members 5,451 guests
Please welcome our newest community members: