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 / Filter Gallery on Sele...
Power Apps
Answered

Filter Gallery on Select on Buttons

(1) ShareShare
ReportReport
Posted on by 669
Hello,
 
I have a Gallery (named as galInspection) where the Items property is set as below. (New or Edited items shows on top within the Gallery using below expression)
SortByColumns(Search('SharePoint List Name', TextInput1.Text, Employee Name, 'Customer Name', Status),"Modified", SortOrder.Descending)
TextInput1 is used to Search the Gallery for Employee Name, Customer Name and Status
 
My requirement is to add 4 Buttons to filter the Gallery on click on this buttons.
 
For Instance: My Status column is a Text Input, which is a calculated field and updates as "In Progress" or "Completed"
 
Add a Button for Status and on click of this button, filter the Gallery which only says "In Progress". In this Button text also show Count of "In Progress". I'm using below expression In Text property 
CountIf('SharePoint List Name', Status="In Progress")
Similarly I need one button for Response Date. On click on this button filter the gallery where Response Date is blank and show the Count in text property of this button.
 
Need assistance on filtering the gallery on click on buttons. Please advise. Thanks!
 
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,494 Most Valuable Professional on at
    You need to set a Variable OnSelect of each button - example
    UpdateContext({varStatus: "In Progress"})
    then the Gallery Items
    Filter(
       'SharePoint List Name', 
       Status = varStatus
    )
    The count can remain as you have it.
    One clarification I need is your comment My Status column is a Text Input, which is a calculated field and updates as "In Progress" or "Completed". If this is a SharePoint calculated column, they are not reliably compatible with Power Apps and their use should be avoided.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • WarrenBelz Profile Picture
    154,494 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • Prem4253 Profile Picture
    669 on at
     
    Thanks! your solution worked.
     
    You always there to provide solutions to the queries we ask.
     
    Much appreciated.

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 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard