Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Filtering Gallery with Dropdown plus a Combobox

(0) ShareShare
ReportReport
Posted on by 725

Hi all,

I sort of have this working but not quite right. Focusing on the right pane of my sheet I have a Gallery filtered by both the dropdown (Dropdown_Sup_3) currently showing Lynn River, and a combobox (ComboBox1Custom) currently showing 4 Items. The dropdown is filtering but the combobox is still letting me choose items from other Suppliers. Is the combobox supposed to be filtered by the dropdown?Filter.png

  • Verified answer
    R Bakker Profile Picture
    725 on at
    Re: Filtering Gallery with Dropdown plus a Combobox

    Thank you

    Filter(Table1,Supplier=Dropdown_Sup_3.Selected.Result)

    This part of your code fixed it. 

  • v-yutliu-msft Profile Picture
    on at
    Re: Filtering Gallery with Dropdown plus a Combobox

    Hi @Corissandageri ,

    Do you want the combo box only display the items filtered by the drop down?

    If so, Please set the combo box's Items:

    Filter(Table1,Supplier=Dropdown_Sup_3.Selected.Result)

    Other formulas do not need to modify.

     

     

    If you want the combo box display items without duplicate value, try this:

    Distinct(Filter(Table1,Supplier=Dropdown_Sup_3.Selected.Result),Distinct).Result

    In this situation, the DisplayFields and Search Fields could only set to the column.

    DisplayFields

    ["Result"]

    Search Fields

    ["Result"]

    The gallery's Items:

    If(IsEmpty(ComboBox1Custom.SelectedItems) ,Table1 , Filter(Table1,Description02 in ComboBox1Custom.SelectedItems.Result && Supplier in Dropdown_Sup_3.Selected.Result))

     

     

     

    Best regards,

  • mdevaney Profile Picture
    29,987 Super User 2025 Season 1 on at
    Re: Filtering Gallery with Dropdown plus a Combobox

    @Corissandageri 

    Would simply re-using the same code from the Items property of your Dropdown work?

    Sort(Distinct(Table1,Supplier),Result)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • R Bakker Profile Picture
    725 on at
    Re: Filtering Gallery with Dropdown plus a Combobox

    Yeah, taking a while to understand how to work with combobox.

    Dropdown_Sup_3

    Items 

    Sort(Distinct(Table1,Supplier),Result)

     

    ComboBox1Custom

    Items

    Table1

    OnChange 

    ClearCollect(Purchaselist1, Gallery4Custom.AllItems)

    DisplayFields

    ["Description02","Supplier"]

    Search Fields

    ["Description02","Supplier"]

     

    Gallery4Custom

    Items

    If(IsEmpty(ComboBox1Custom.SelectedItems) ,Table1 , Filter(Table1,Description02 in ComboBox1Custom.SelectedItems.Description02 && Supplier in Dropdown_Sup_3.Selected.Result))

  • Community Power Platform Member Profile Picture
    on at
    Re: Filtering Gallery with Dropdown plus a Combobox

    In the combobox that's showing items from other suppliers, what is the Items property set to? It should be filtered there.

  • mdevaney Profile Picture
    29,987 Super User 2025 Season 1 on at
    Re: Filtering Gallery with Dropdown plus a Combobox

    @Corissandageri 

    Are you saying that the ComboBox should only be showing 2 items?

     

    Please supply the code used in the Items property of the ComboBox.  Is there any column for Vendor in the datasource for this?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard