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 / Clearing Filters from ...
Power Apps
Answered

Clearing Filters from a Gallery or Showing all Line Items from the Source Data

(2) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a gallery that I created from an Excel (OneDrive for Business) source that's in the form of the Power Apps Service Desk template. I set up the Filters Gallery as well as a Search button to filter the gallery ("Tickets Gallery") in different ways.

 

The problem I have right now is that when I filter it, I have no way of getting it back to showing all tickets or all items in my source.

 

I've tried:

  • Using the Reset function;
  • Using the Refresh function;
  • Adding nested If and Filter functions in addition to the ones I already have for telling the gallery to show items based on the Search bar or the Filter Gallery, depending on what the user clicks;
  • Adding a column in the source Excel with a value that all of the items have and trying to add a Filter function that tells the Ticket Gallery to show all items that have that value if the Reset button is clicked; and
  • Various formula attempts on a Reset button.

but haven't gotten anything to work.

 

I've attached a screenshot (with blurred data).

Clearing Filters from a Gallery.png
Categories:
I have the same question (0)
  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @AHG 

     

    Here's one approach you can try:

     

    Your reset button's OnSelect property should set a text variable to "" (empty text), such as like this: Set(FilterVariable,"")

     

    Then your Items property of Gallery should be like this:

     

    If(IsBlank(FilterVariable),DataSource,Filter(DataSource,YourFilterHere))

     

    Above example Items will show all items for the data source if the search variable text is blank. If it is not blank, it will use the Filter instead.

     

    Also, you may need:

    Make the OnChange property of your search field to set the variable when value is changed - like this:

    Set(FilterVariable, YourControl.Text)

     

    See if something like the above helps.

     

     

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

    Hi @AHG ,

    Could you please show more details about the formula you specified within the Items property of the TicketsGallery?

     

    Based on the needs that you mentioned, I think a global variable could achieve your needs. You could consider take a try with the following workaround:

    Add following formula within the OnSelect property of the Group1 control:

    Set(CurrentSelectedOption, ThisItem.TicketTypes)

    Add a "Reset" button, set the OnSelect property to following:

    Set(CurrentSelectedOption, Blank())

    Set the Items property of TicketsGallery to following:

    If(
     IsBlank(CurrentSelectedOption),
     TicketsCollect1, // TicketsCollect1 represents the data source you want to display within the TicketGallery
     Filter(TicketsCollect1, ....)
    )

     

    Please consider take a try with above solution, check if the issue is solved.

     

    Best regards,

  • AHG Profile Picture
    Microsoft Employee on at

    Please see the attached for a screenshot of how I have the formula right now. You recommended setting a Global Variable like the previous post, but I can't seem to get it to work as another nested "IF" statement within the already established Items formula.

     

    Note that I also blocked out some content for privacy, but you can easily see the structure of the formula.

    Clearing Filters from a Gallery - Items Formula.png
  • AHG Profile Picture
    Microsoft Employee on at

    I just posted this in reply to the second suggestion on this thread and will mention again here that, even with an established variable, I cannot seem to get another nested "IF" statement in the Items formula for the gallery. See the attached image (some info blocked out for privacy).

    Clearing Filters from a Gallery - Items Formula.png
  • AHG Profile Picture
    Microsoft Employee on at

    [UPDATE] the solution seems to be a combination of a variable + reset action on the button that resets the Search Box after clearing the Variable (i.e., making it blank).

     

    OnSelect event for the button = Set(<Global Variable>,Blank());Reset(<Search Box>)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard