How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (2024)

Yesterday, someone from my team asked me whether it was possible to filter the Power Apps gallery based on multiple Combo box values. Yes, of course, achieving it is possible and very easy.

In this article, I will explain how to filter Power Apps gallery based on Combo box selection along with the topics below:

  • Filter Power Apps gallery with multiple Combobox values
  • Power Apps filter gallery based on Combo box multi-selected item
  • Filter Power Apps gallery using Combo box allows multiple selections

Table of Contents

Filter Power Apps Gallery Based On Combo Box Selection

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

I have a SharePoint list [Loan Approval] that has various columns like:

Column NameData Type
NameIt is a default title column, I just renamed it as “Name”
CountryLookup
Loan TypeChoice [“Car Loan”, “Home Loan”, “Gold Loan”]
Loan Applied DateDate and time
Approved or NotYes/No
Loan Handled ByPerson or group
Eligibility ProvidedChoice [“Passport”, “Utility Bill”, “Voter registration card”]
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (1)

On my Power Apps screen, I have added a Combo box control and a Gallery control. The combo box is connected to a SharePoint list column [Country]. The gallery filters and displays the respective records whenever a user selects any value from the combo box control.

How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (2)

Follow the below steps to achieve this:

  • On the Power Apps screen, insert a Combo box control -> Set its Items property to:
Distinct('Loan Approval',Country.Value)

Where,

  1. Loan Approval = SharePoint list name
  2. Country = SharePoint list column name
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (3)
  • Now, we want to display the SharePoint list records based on the selected value of the combo box. For that, insert aGallery control -> Set its Items property to:
Filter( 'Loan Approval', IsBlank(cmb_Country.SelectedItems.Value) || IsEmpty(cmb_Country.SelectedItems.Value) || Country.Value = cmb_Country.Selected.Value)

Where,

  1. Loan Approval = SharePoint list name
  2. cmb_Country = Combo box control name
  3. Country = SharePoint list lookup column
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (4)
  • Once your app is ready, save,publish, andpreviewit. When the user selects any value from the combo box control, the gallery will filter and display all records based on the value selected by the combo box.

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

Filter Power Apps Gallery Based On Multiple Combo Box Values

This section will explain how to control the gallery based on multiple combo box values.

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

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

How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (6)

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

  • On the Power Apps screen, insert a First Combo box control -> Set its Items property to:
Distinct('Loan Approval','Loan Type'.Value)

Where,

  1. Loan Approval = SharePoint list name
  2. Loan Type = SharePoint list choice column name
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (7)
  • Next, insert the second Combo box control -> Set its Items property to:
Distinct('Loan Approval','Loan Handled By')

Where,

  1. Loan Approval = SharePoint list name
  2. Loan Handled By = SharePoint list person column name
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (8)
  • We want to display the SharePoint list records based on the values selected by both combo boxes. For that, insert aGallery control -> Set its Items property to:
Filter( 'Loan Approval', (cmb_LoanType.Selected.Value in 'Loan Type'.Value && cmb_LoanHandledBy.Selected.Value in 'Loan Handled By'))

Where,

  1. Loan Approval = SharePoint list name
  2. cmb_Loan Type = 1st Combo box control name
  3. Loan Type = SharePoint list choice column name
  4. cmb_LoanHandledBy = 2nd Combo box control name
  5. Loan Handled By = SharePoint list person column name
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (9)
  • Save, Publish, and Preview the app. When the user selects a value from both combo box controls, the gallery will filter and display the data that satisfies both combo box selected items.
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (10)

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

Power Apps Filter Gallery Based On Combo Box Multiple Selected Items

I will show you how to filter a Power Apps gallery based on the multiple selected items from the combo box control.

The Power Apps screen has a Combo box control and a Gallery control. The combo box is connected to the SharePoint list choice column [Loan Type] above.

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

How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (11)

Follow the below steps to achieve this:

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

Where,

  1. Loan Approval = SharePoint list name
  2. Loan Type = SharePoint list choice column name
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (12)
  • On the combo box properties pane, enable the toggle switch for Allow Multiple selection as shown below:
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (13)
  • We want to display the SharePoint list records based on multiple combo box-selected values. For that, insert aGallery control -> Set its Items property to:
Filter( 'Loan Approval', IsBlank(cmb_MultipleLoanType.SelectedItems.Value) || IsEmpty(cmb_MultipleLoanType.SelectedItems.Value) || 'Loan Type' in cmb_MultipleLoanType.SelectedItems)

Where,

  1. Loan Approval = SharePoint list name
  2. cmb_MutipleLoanType = Combo box control name
  3. Loan Type= SharePoint list choice column name
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (14)
  • Save, Publish, and Preview the app. When the user selects multiple values from the combo box control, the gallery will filter and display the records based on multiple selected values.
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (15)

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

Power Apps Filter Gallery Using a Combo box that Allows Multiple Selections

Here, I will show you how to filter the Power Apps gallery using a combo box that allows multiple selections.

Per my SharePoint list [Loan Approval], I have a choice column [Eligiblity Provided] that allows multiple values.

How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (16)

Now, in my Power Apps screen, there is aCombo box controlconnected to the above SharePoint list choice column [Eligiblity Provided].

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

How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (17)

To achieve it, follow the below steps:

  • On the Power Apps screen, insert a Combo 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
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (18)
  • Now, we want to display the SharePoint list records based on multiple combo box-selected values. For that, insert aGallery control -> Set its Items property to:
Filter( 'Loan Approval', Concat( cmb_Eligibility.SelectedItems, Value, "," ) in Concat( 'Eligibility Provided', Value, "," ))

Where,

  1. Loan Approval = SharePoint list name
  2. cmb_Eligibility = Combo box control name
  3. Eligibility Provided= SharePoint list choice column name
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (19)
  • Save, Publish, and Preview the app. When the user selects multiple values from the combo box control, the gallery will filter and display the relevant records based on multiple selected values.
How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (20)

We can filter the Power Apps gallery using a combo box that allows multiple selections.

Conclusion

I hope this article helped you learn how to filter a Power Apps gallery based on a Combo box value, filter a Power Apps gallery based on multiple combo boxes, and more, with various examples.

You may also like:

  • Power Apps Dropdown Values Not Showing
  • Get Power Apps Combo Box Selected Value
  • Populate Distinct Values in Power Apps Combo Box

How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (21)

Preeti Sahu

Preeti Sahu is an expert in Power Apps and has over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of Microsoft Power Platform: A Deep Dive book. As a Power Platform developer, she has worked on developing various tools using Power Apps and Power Automate. She also makes Microsoft 365 videos and shares them on YouTube.

How to Filter Power Apps Gallery Based On Combo Box Selection? [With Real Examples] - Enjoy SharePoint (2024)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Patricia Veum II

Last Updated:

Views: 5633

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Patricia Veum II

Birthday: 1994-12-16

Address: 2064 Little Summit, Goldieton, MS 97651-0862

Phone: +6873952696715

Job: Principal Officer

Hobby: Rafting, Cabaret, Candle making, Jigsaw puzzles, Inline skating, Magic, Graffiti

Introduction: My name is Patricia Veum II, I am a vast, combative, smiling, famous, inexpensive, zealous, sparkling person who loves writing and wants to share my knowledge and understanding with you.