web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering Gallery with...
Power Apps
Unanswered

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

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at

    @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?

  • Community Power Platform Member Profile Picture
    on at

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

  • R Bakker Profile Picture
    725 on at

    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))

  • mdevaney Profile Picture
    29,989 Moderator on at

    @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."

  • v-yutliu-msft Profile Picture
    on at

    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,

  • Verified answer
    R Bakker Profile Picture
    725 on at

    Thank you

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

    This part of your code fixed it. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard