How to Filter Multiple Person Column in Power Apps?

Have you ever filtered Power Apps Gallery or Data table control by multiple person columns? Ok, no worries!

This Microsoft Power Apps tutorial will explain everything about how to filter multiple person column in Power Apps with a simple scenario.

How to Filter Multiple Person Column in Power Apps

Let’s explore it.

Scenario:

I have a SharePoint Online list named “Travel Requests” and this list contains the below fields.

Column NameData Type
Trip TitleIt is a default single line of text
AirlineChoice
Travel Start DateDate and time
Travel End DateDate and time
RequesterPerson or Group
Estimated AirfareCurrency

Refer to the below image:

Filter Multiple Person Column in Power Apps

In the SharePoint person or Group Column [Requester], you must select “Allows multiple selections” as shown below.

Filter Multiple Person Column in the Power Apps

In Power Apps, there is a ComboBox control, a Serch icon, and a Gallery control. As seen in the screenshot below, the Gallery control shows each record from a SharePoint list based on the Person filed multiple selections using the search icon.

How to Filter Multiple Person Column in a Power Apps app

To work around this, follow the below-mentioned steps. Such as:

1. Open Power Apps -> Create a Blank canvas app and connect it to the respective SharePoint list [Travel Requests] like below.

Filter Multiple Person Column in a Power Apps app

2. Also, connect the app to the Office365Users shown below.

Filter Multiple Person Column in the Power Apps app

3. Now, insert a Search icon and set its OnSelect property to the code below.

OnSelect = ClearCollect(
    colTravels,
    'Travel Requests'
);
Collect(
    colRequesters,
    Filter(
        colTravels,
        User().Email in Requester.Email
    )
)

Where,

  • colTravels = Power Apps Collection Name
  • ‘Travel Requests’ = SharePoint Online List
  • colRequesters = Second Power Apps collection
  • Filter() = This function is used to filter each record from a data source based on the formula
  • Requester = SharePoint Person or Group Field
How to Filter Multiple Person Column in Power Apps

4. Next, insert a ComboBox control and set its Items property as:

Items = Office365Users.SearchUser({SearchTerm: ComboBox_Requesters.SearchText}).DisplayName

Where,

  • Office365Users = Office365Users Datasource
  • ComboBox_Requesters = Power Apps ComboBox Name
  • SearchTerm = Power Apps Variable Name
How to Filter Power Apps app Multiple Person Column

5. Once, you added the Office365Users, the ConboBox control will display all Office356Users as in the screenshot below.

How to Filter Multiple Person Column from Power Apps app

6. Then, insert a Gallery control and set Its Items property as:

Items = colRequesters

Where,

  • colRequesters = Power Apps Collection Name
How to Filter Multiple Person Column in the Power Apps app

7. Once your app is ready, Save, Publish, and preview the app. When the user selects multiple users from a ComboBox control and clicks on the search icon, the Gallery control will filter and display each record from a SharePoint list based on the multiple-person field selection, as in the screenshot below.

How to Filter Multiple Person Column from a Power Apps app

This is all about filtering multiple-person columns in the Power Apps app.

Conclusion

I hope this Microsoft Power Apps tutorial taught in detail information about how to filter multiple person column in Power Apps with a simple scenario.

Also, you may like some more Power Apps tutorials:

>