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

Announcements

News and Announcements icon
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 Combo Box (Formula Help)

(0) ShareShare
ReportReport
Posted on by 109

So I have three tables: Master, Products and Vendors.

 

Master table has a column named "Product" which looks up the Products table

Products table has a column named "Vendor" which looks up the Vendors table

Vendors table has column named "Vendor Name"

 

I have a combo box in my application whose items come from the "Vendor Name" column in the Vendor Table. Whenever a new item is selected it's put into a collection called "selectedVendors_collection".

I also have a gallery whose items are dependent on whatever is in the combo box.

 

I'm trying to use the following formula to filter my gallery items based on whatever items are present in the combo box.

 

Filter(
 'Master',
 (IsEmpty(selectedVendors_collection) || Product.Vendor.'Vendor Name' in selectedVendor_collection.Result) 
)

 

 

When adding to my combo box all cells within the gallery disappear which leads me to believe that the second half of the "or" statement is the one being evaluated to true but somehow there is nothing shown. I've tried a few different lookup() functions to see if that would work but haven't had any luck yet. Why would there be no cells shown in the gallery and how do I correctly reference the "Vendor Name" column? 

Categories:
I have the same question (0)
  • jorge.daniel Profile Picture
    1,430 Super User 2024 Season 1 on at

    Does your combo allow for multiple selection?

  • mqcp Profile Picture
    109 on at

    @jcfDaniel 

    Yes, it does.

  • jorge.daniel Profile Picture
    1,430 Super User 2024 Season 1 on at

    try this


    //Combo with more than one selection
    Filter(
    YouTable,
    YourColumn in YourCombo.SelectedItems.Value
    )

  • mqcp Profile Picture
    109 on at

    @jcfDaniel 

    I had to use:

    Filter(myTable, myColumn in myCombo.SelectedItems.Result) 

    because using "Value" after the dot operator raised a syntax error. Regardless, this didn't work either. I tested this method using a different column from my Master table, which doesn't require me to traverse down three different tables, and it worked. I believe the issue is stemming from how I'm referencing the "Vendor Name" column but power apps is not throwing me any error in doing so.

  • jorge.daniel Profile Picture
    1,430 Super User 2024 Season 1 on at

    what do you have in the combo's Items?

  • mqcp Profile Picture
    109 on at

    @jcfDaniel 

    a collection  named "vendors_collection" defined as:

    ClearCollect(vendors_collection,{Result:"All"});
    Collect(vendors_collection,Distinct('Vendors', 'Vendor Name'));

     And not to be confused with my "selectedVendors_collection" that's mentioned earlier.

  • jorge.daniel Profile Picture
    1,430 Super User 2024 Season 1 on at

    That's a bit confusing.

     

    I would suggest something like:

     

    App OnStart : Collect(vendors_collection, Distinct(Vendors, 'Vendors Name'))

     

    Combo Items: vendors_collection

     

    Gallery Items:

    Filter(
    vendors_collection,
    'Vendors Name'in ComboBox.SelectedItems.Result
    )

  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @mqcp ,

     

    Could you please tell me:

    What is your data source?

     

    Best Regards,

    Levi

  • mqcp Profile Picture
    109 on at

    @v-liwei-msft 3 different dataverse tables connected down through lookup columns.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard