How to Filter List Box in Power Apps?

Do you know how to filter list box in Power Apps? If Not, Don’t worry. This Microsoft Power Apps tutorial will teach you how to filter a Power Apps gallery based on the List box selected value.

Also, we will see how to use multiple List box controls to filter gallery with a simple scenario and many more like:

  1. Power Apps filter gallery by multi-select list box.
  2. Power Apps filter items from selected multiple List box values.

How to Filter List Box in Power Apps

Let’s see how to filter a Power Apps gallery based on the List box with a simple scenario:

Example,

I have a SharePoint list [Power Platform Training] that has various columns like:

Column NameData type
User IDTitle
User NameSingle line of text
CourseChoice [“Power Apps,” “Power Automatr,” “Power Bi,” “Power Virtual Agent”]
Course Handled ByPerson or group
Power Apps List box Filter

I created a Power Apps canvas app and added a List box and Gallery control. The List box is connected to a SharePoint list choice column [Course]. The gallery filters and displays the respective records whenever a user selects any value from the list box control.

Filter List box control in Power Apps

Follow the below steps to achieve this:

  • Sign in to your Power Apps with your valid Microsoft 365 credentials.
  • Create a Blank canvas app -> On the Power Apps screen, insert a List box control -> Set its Items property to:
Choices('Power Platform Training'.Course)

Where,

  1. Power Platform Training = SharePoint list name
  2. Course = SharePoint list choice column name
How to filter Power Apps List box control
  • Now, we want to display the SharePoint list records based on the list box selected value. For that, insert a Gallery control -> Set its Items property to:
Filter(
    'Power Platform Training',
    IsBlank(lst_Course.SelectedItems.Value) || IsEmpty(lst_Course.SelectedItems.Value) || Course.Value = lst_Course.Selected.Value
)

Where,

  1. Power Platform Training = SharePoint list name
  2. lst_Course = List box control name
  3. Course = SharePoint list column name
How to Filter List Box in Power Apps
  • Once your app is ready, SavePublish, and Preview the app. When the user selects any value from the List box control, the gallery will filter and display all records based on the List box selected value.
Filter Power Apps gallery based on the List box selected value

This is how to filter a gallery control based on the List box selected value in Power Apps.

Power Apps filter with multiple List box

This section will explain how to filter gallery control based on multiple List boxes.

My Power Apps screen has two List box controls and a Gallery control. The first List box is connected to the SharePoint list choice column [Course]. Then, the other List box is connected to the same above SharePoint list person column [Course Handled By].

Whenever a user selects a value from both list box controls, the gallery control filters and displays only the data that matches both the selected items from the List box controls, as shown below:

Power Apps filter with multiple List box

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

  • On the Power Apps screen, insert a First List box control -> Set its Items property to:
Choices('Power Platform Training'.Course)

Where,

  1. Power Platform Training = SharePoint list name
  2. Course = SharePoint list choice column name
How to filter with multiple List box in Power Apps
  • Next, insert the second List box control -> Set its Items property to:
Distinct(
    'Power Platform Training',
    'Course Handled By'.DisplayName
)

Where,

  1. Power Platform Training = SharePoint list name.
  2. Course Handled By = SharePoint list person column name.
Filter with multiple List box in Power Apps
  • We want to display the SharePoint list records based on both List box selected values. For that, insert a Gallery control -> Set its Items property to:
Filter(
    'Power Platform Training',
    (Len(lst_PowerPlatformCourse.Selected.Value) = 0 || Course.Value in lst_PowerPlatformCourse.SelectedItems.Value) && 
    (Len(lst_CourseHandledBy.Selected.Value) = 0 || 'Course Handled By'.DisplayName in lst_CourseHandledBy.SelectedItems.Value)
)

Where,

  1. Power Platform Training = SharePoint list name
  2. lst_PowerPlatformCourse = 1st List box control name
  3. Course = SharePoint list choice column name
  4. lst_CourseHandledBy = 2nd List box control name
  5. Course Handled By = SharePoint list person column name.
How to filter Power Apps gallery control based on multiple List box values
  • SavePublish, and Preview the app. When the user selects a value from both list box controls, the gallery will filter and display the data that satisfies both list box-selected items.
Filter Power Apps gallery control based on multiple List box values

This is how to filter a gallery with multiple List boxes in Power Apps.

Power Apps filter gallery by multi-select list box

I will show you how to filter a Power Apps gallery by a multi-select list box

The Power Apps screen has a List box control and a Gallery control. The List box is connected to the SharePoint list choice column [Course] above.

Whenever a user selects multiple values from the List box controls, the gallery filters and displays the records based on the multiple selected values of the List box controls.

Power Apps filter gallery by multi-select list box

Follow the below steps to achieve this:

  • On the Power Apps screen, insert a List box control -> Set its Items property to:
Choices('Power Platform Training'.Course)

Where,

  1. Power Platform Training = SharePoint list name
  2. Course = SharePoint list choice column name
How to filter gallery by multi-select list box in Power Apps
  • We want to display the SharePoint list records based on multiple combo box-selected values. For that, insert a Gallery control -> Set its Items property to:
Filter(
    'Power Platform Training',
    IsBlank(lst_MutipleSelectedCourse.SelectedItems.Value) || IsEmpty(lst_MutipleSelectedCourse.SelectedItems.Value) || Course in lst_MutipleSelectedCourse.SelectedItems
)

Where,

  1. Power Platform Training = SharePoint list name
  2. lst_MutipleSelectedCourse = Power Apps List box control name
  3. Course = SharePoint list choice column name
Filter Power Apps gallery by multi-select list box
  • SavePublish, and Preview the app. When the user selects multiple values from the list box control, the gallery filters and displays the records based on multiple selected values.
How to filter Power Apps gallery based on List box multiple selected items

We can filter the Power Apps gallery based on the multiple selected items from the List box control.

How to filter items from selected multiple List Box values

Here, I will show you how to filter items from selected multiple List Box values

For Example, I have a SharePoint Online list [Loan Approval] that has various columns like:

Column NameData Type
User NameTitle
CountryLookup
Loan TypeChoice [“Car Loan,” “Home Loan,” “Gold Loan”]
Eligibility ProvidedChoice [“Passport,” “Utility Bill,” “Voter registration card”]
How to filter items from selected multiple List Box values in Power Apps

As per the above SharePoint list [Loan Approval], I have a choice column [Eligiblity Provided] that allows multiple values.

Filter items from selected multiple Power Apps List Box values

On my Power Apps screen, I have added a List box and a Data table. The List box is connected to a SharePoint list column [Eligiblity Provided].

Whenever a user selects multiple values from the List box control, the data table should filter based on a SharePoint list of records with multiple values and display the relevant records.

Power Apps Filter items from selected multiple List Box values

To achieve it, follow the below steps:

  • On the Power Apps screen, insert a List box control -> Set its Items property to:
Choices('Loan Approval'.'Eligibility Provided')

Where,

  1. Loan Approval = SharePoint list name
  2. Eligibility Provided = SharePoint list choice column name
Filter items from selected multiple List Box values in Power Apps
  • We want to display the SharePoint list records based on multiple combo box-selected values. For that, insert a Data table -> Set its Items property to:
Filter(
    'Loan Approval',
    Concat(
        lst_Eligibility.SelectedItems,
        Value,
        ","
    ) in Concat(
        'Eligibility Provided',
        Value,
        ","
    )
)

Where,

  1. Loan Approval = SharePoint list name
  2. lst_Eligibility = List box control name
  3. Eligibility Provided= SharePoint list choice column name
How to filter items from selected multiple List Box values in Power Apps
  • SavePublish, and Preview the app. When the user selects multiple values from the List box control, the gallery will filter and display the relevant records based on multiple selected values.
Filter items from selected multiple List Box values Power Apps

We can filter the Power Apps gallery items from selected multiple List Box values.

Power Apps Filter List Box by Text Input

This section will show you how to filter the Power Apps list box by text input control.

Example,

I created a Power Apps canvas app and added a Text input, a List box, and a Gallery control. The list box control contains the items from the above SharePoint list choice column [Course].

Whenever the user provides the list box value in the text input control, based on that, the list box will select the value, and the gallery will filter and display the record based on the selected value of a list box.

Power Apps Filter List Box by Text Input

Follow the below steps to achieve this:

  • On the Power Apps screen, insert a Text input control as shown below:
Filter Power Apps List Box by Text Input
  • Insert a List box control -> Set its Items property to:
Choices('Power Platform Training'.Course)

Where,

  1. Power Platform Training = SharePoint list name
  2. Course = SharePoint list choice column name
How to filter Power Apps List Box by Text Input
  • Select the List box control -> Set its Default property to:
txt_Course.Text

Where,

  1. txt_Course = Text input control name
Filter List Box by Text Input in Power Apps
  • Insert a Gallery control -> Set its Items property to:
Filter(
    'Power Platform Training',
    IsBlank(lst_Course.SelectedItems.Value) || IsEmpty(lst_Course.SelectedItems.Value) || Course.Value = lst_Course.Selected.Value
)

Where,

  1. Power Platform Training = SharePoint list name
  2. lst_Course = List box control name
  3. Course = SharePoint list column name
How to filter List Box by Text Input in Power Apps
  • SavePublish, and Preview the app. When the user provides the list box value in the text input control, based on that, the list box will select the value, and the gallery will filter and display the record based on the selected value of a list box.
Power Apps filter the List Box by Text Input value

We can filter the Power Apps List box by text input.

Conclusion

I hope this tutorial provided complete information about the Power Apps List box filter. We can use the Filter() function to achieve it.

In this Power Apps tutorial, we have learned how to filter a Power Apps gallery using a List box selected value with a complete example.

Additionally, we will see how to use multiple List box controls to filter the gallery with a simple scenario and how to filter the Power Apps gallery by multi-select List box.

Lastly, you have learned about the Power Apps filter items from selected multiple List Box values.

Also, you may like some more Power Apps tutorials: