cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Converting People Picker to Text field

I have a form that a requester will fill out. Towards the end they need to choose from a People/Group picker for their approver. 

 

Once the requester submits the form, it goes off to the Approver to Approve/Deny based on an email they receive that will provide a link to a new screen within the APP for approvals. This new screen is setup with a Gallery so they can see all approvals that were assigned to them. 

 

From what I've found, it isn't possible to set a Gallery to Filter or LookUp based on a People column from SP. So I want to have a hidden field on the requester's screen that then they select their Approver, it will auto fill a text field. This will allow me to filter in the Gallery.

 

Thoughts?

3 REPLIES 3
Highlighted
Dual Super User III
Dual Super User III

Person/Group columns are complex objects, so you can't use the column by itself to filter.  But you can filter using the properties of the person/group column.  For example, email or display name.  You have to specify the property though.



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

@Pstork1 ,

 

I tried adding the .DisplayName, but seems like something isn't happy still.

 

The datacard with the people picker:

 

NathanFra_0-1605887329072.png

 

Here is the Items for the Gallery:

NathanFra_1-1605887421447.png

 

Thank you!

Highlighted
Dual Super User III
Dual Super User III

Your code is trying to match the DisplayName for the current user against the full Approver column.  You should do two things.

  1. Save the current user DisplayName in a variable using the following.  This is to prevent delegation warnings.
    Set(CurrentUserName, User().DisplayName)
  2. Change your code to the following
    Filter('Travel Pre-Authorization',Approver.DisplayName = CurrentUserName)


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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,291)