cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hazza
Regular Visitor

Show selected person in Gallery view

I am building an app which tracks jobs/tasks and is connected to a Sharepoint list. One of the columns in my list is "Staff Member" which is a Person column and allows you to search and pick from all current Office 365 users on our domain. 

There's an EditForm which is used to enter the job details, and you can choose the "Staff Member" here to allocate them to the job.

 

I'm having difficulty showing this allocated person as a field in my Gallery. I want it so staff members can see what jobs are allocated to them and eventually I want them to be able to filter this view too so they only see what's relevant to them.

 

I know that with choice columns in a List, you need to use a concat command to show the selected choice in the gallery, i.e -

 

Concat(ThisItem.StaffMember.Value, Concatenate(Text(Value),", "))

 

But this doesn't seem to work with my Person column.

Anybody have any ideas how I can get the Person showing in the gallery?

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
AmDev
Super User
Super User

Hi @Hazza 

 

You should be able to display the value from a choice field - If you have a label in your Gallery for the person column, is the following not working for you?

 

ThisItem.StaffMember.DisplayName

 

Failing that, you can try the following in a nested table scenario

 

First(ThisItem.StaffMember).DisplayName

 

Hope this helps.

View solution in original post

5 REPLIES 5
AmDev
Super User
Super User

Hi @Hazza 

 

You should be able to display the value from a choice field - If you have a label in your Gallery for the person column, is the following not working for you?

 

ThisItem.StaffMember.DisplayName

 

Failing that, you can try the following in a nested table scenario

 

First(ThisItem.StaffMember).DisplayName

 

Hope this helps.

Hazza
Regular Visitor

Hi @AmDev 

The nested table scenario worked perfectly, thank you! Not sure how I didn't come across this solution in the various other posts and tutorials I've been trawling though. 

 

Apologies for opening this back up again, but do you know what I'd need to add to this in order to show multiple staff names? The column allows multiple selections, however in the event that the job is allocated to more than one staff member, it is currently only showing the first one selected on the Editform.

 

Thanks again!

Hazza
Regular Visitor

I should have done some more troubleshooting before pestering you with more questions, as I've figured it out.  I needed to use it with the concatenate command - 

 

Concat(ThisItem.StaffMember.DisplayName, Concatenate(Text(DisplayName),", "))

 

This now displays all the names selected on the EditForm in the Gallery view.

 

Thanks again!

AmDev
Super User
Super User

Hi @Hazza 

 

Yes, in that case, go with:

 

Concat(ThisItem.YourColumnName,Value,", ")

 

Great work!... glad you're sorted - both the same expressions (bar value for displayname) - Your concatenate is replaced by the optional separator parameter at the end of my expression.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,305)