In the article Power Apps: Filter A Gallery With Multiple Dropdowns I mentioned the employee-dropdown could be replaced with a People Picker instead. Here’s how to do it:
Update the Employee column to Person type in the Paid Time-Off SharePoint list. Leave all other data the same as before.
TimeOffDate | Employee | TimeOffType | Status |
9/1/2020 | Kelly Smith | Personal | Submitted |
9/4/2020 | Kelly Smith | Vacation | Approved |
9/5/2020 | Kelly Smith | Vacation | Approved |
9/8/2020 | Jennifer Houston | Vacation | Rejected |
9/12/2020 | Sarah Green | Personal | Submitted |
9/13/2020 | Jennifer Houston | Vacation | Approved |
9/15/2020 | Sarah Green | Personal | Rejected |
9/18/2020 | Kelly Smith | Personal | Rejected |
9/19/2020 | Sarah Green | Sick | Approved |
9/21/2020 | Jennifer Houston | Personal | Submitted |
Add the Office365Users connector to your app.
Create a ComboBox called cmb_Employee and place it beneath the Type and Status dropdowns.
Write this code in the following properties of cmb_Employee
DisplayFields: ["Display Name"]
SearchFields: ["Display Name"]
Items: Office365Users.SearchUser({searchTerm: Self.SearchText, top: 100})
IsSearchable: true
SelectMultiple: false
Then change the Items property of the Gallery to this code.
Filter(
'Paid Time Off',
drp_Type.Selected.Value=Blank() Or TimeOffType=drp_Type.Selected.Value,
drp_Status.Selected.Value=Blank() Or Status=drp_Status.Selected.Value,
cmb_Employee.Selected.DisplayName=Blank() Or Employee=cmb_Employee.Selected.DisplayName
)
The people picker will now filter the gallery.
Return to previous page
Click the link to go back to the main article: Power Apps: Filter A Gallery With Multiple Dropdowns.