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 / Clear all filters butt...
Power Apps
Answered

Clear all filters button not working

(0) ShareShare
ReportReport
Posted on by 46

Hello, 

I have a "Category Gallery" that shows product categories and a "Product Gallery" that shows all products. 

When I click on a product category in the "Category Gallery", the "Product Gallery" will filter all products to that selected product category.

To do that, I have set a filter on the "Product Gallery" Items = Filter('Product Inventory',ProductCategory = ProductCategoriesGallery.Selected.ProductCategory). 

I am now searching for a way to reset the filter, so that all products show, irrespectively of their category. 

I've tried a Button control with OnSelect = Reset(ProductCategoriesGallery), but that isn't working. 

 

I find solutions for dropdown or text filters, but nothing to help me to get this requirement working. 

 

Many thanks for any advise. 

 

 

 

Categories:
I have the same question (0)
  • asdasdasdasdasd Profile Picture
    72 on at

    Hi There, 

    Some logic you could use is to set a context variable or a standard variable that checks if the data is currently filtered.

    Lets assume your variable is called "is_fitlered" then use set(is_filtered,true) which is applied on the on change property of the category filter. You can use set(is_filtered,false) which is applied to the on select of your reset button.

    Your syntax on the product inventory will be:

    If(is_filtered,  //this validates if your is_filtered variable is true and requires your dataset to be filtered
    Filter('Product Inventory',ProductCategory = ProductCategoriesGallery.Selected.ProductCategory), //if is_filtered is true then show the filtered value
    Your_Unfiltered_Field
    ) //if is_filtered is false then show your dataset unfiltered (the default state of your dropdown, something like Choices('Product Inventory'.ProductCategory)

  • T_T00 Profile Picture
    46 on at

    Hi @asdasdasdasdasd

     

    Sorry, but I am now confused. Mind you, I am pretty new to Power Apps!

     

    There are no choice columns in my tables and I am not using dropdowns. 

     

    Can you please elaborate, be more explicit as to what I need to do where? Many thanks 🙂 

     

  • Verified answer
    asdasdasdasdasd Profile Picture
    72 on at

    Apologies, I misread and will delete the previous response.

    Just clarifying, You have 2 galleries, one that filters the other, but would like a button to reset the filtered gallery.

    On your clear filter button's onSelect property you can use context variables to remove the filter on your gallery:
    UpdateContext({is_filtered:false})

    On your Product Gallery items use this syntax which checks to see if a Category is selected and will apply the filter:

    If(is_filtered, 

    Filter('Product Inventory',ProductCategory = ProductCategoriesGallery.Selected.ProductCategory),
    'Product Inventory')

    On your Category Gallery onSelect property use this:

    UpdateContext({is_filtered:true})


  • T_T00 Profile Picture
    46 on at

    Many thanks for looking at this again. That worked 🎆

     

     

     

     

     

     

     

     

     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard