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 / Button to Filter Gallery
Power Apps
Answered

Button to Filter Gallery

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

 

I have an app that is a ticketing system, within this, you can view all tickets so I have the below code in a gallery and a search box at the top to filter the gallery

 

Filter(TicketingSystem, 
ID = Value(SharePointSearch.Text) ||
StartsWith(Status, SharePointSearch.Text) ||
StartsWith(ID, SharePointSearch.Text) ||
StartsWith('Created By'.DisplayName, SharePointSearch.Text) ||
StartsWith(Technician, SharePointSearch.Text)
)

 

I want to add a button at the top so that users can easily click it and it will filter the gallery to only show entries with the status as "Open" but I still want the users to be able to use the search box at the top to filter if they want to, is this possible please? 

 

Thanks in advance!

 

Dave

Categories:
I have the same question (0)
  • Verified answer
    anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @Dave-ITMan  ,

    Yes, it's possible to add a button to filter the gallery to show only entries with the status as "Open" while still allowing users to use the search box for further filtering. Here’s how you can achieve this:

    Insert a button and set its OnSelect property:

    Set(varShowOpenOnly, !varShowOpenOnly)

     

    Modify the Items property of your gallery to include the condition for varShowOpenOnly

     

    Filter(
     TicketingSystem,
     (varShowOpenOnly && Status = "Open") || !varShowOpenOnly,
     ID = Value(SharePointSearch.Text) ||
     StartsWith(Status, SharePointSearch.Text) ||
     StartsWith(ID, SharePointSearch.Text) ||
     StartsWith('Created By'.DisplayName, SharePointSearch.Text) ||
     StartsWith(Technician, SharePointSearch.Text)
    )

     

     

     

     

  • Dave-ITMan Profile Picture
    on at

    Hi @anandm08 

    That's great thank you so much!

    Regards

    Dave

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard