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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Connect A Button to a ...
Power Apps
Unanswered

Connect A Button to a Gallery to Filter

(0) ShareShare
ReportReport
Posted on by 26

Hello, I'm trying to set up buttons to filter a list in a gallery. The list is connected to a SharePoint List, and the column is a choice column. I'm very new to power apps, but I have On Select set up as:

 

Filter ('Cleaning-Checklist', Area. Value = "Sorter")

 

but it is not connecting to the list in the gallery. 

 

When I put the filter into the items section in the gallery it works fine, but I want it to only filter when I click the button. 

 

Here's what it looks like:

Morgan_W_0-1695974331293.png

 

If you need more information, please let me know I cannot seem to figure this out. Thanks!

 

Categories:
I have the same question (0)
  • Verified answer
    Rajkumar_M Profile Picture
    3,741 Super User 2025 Season 2 on at

    Hi @Morgan_W 

     

    Set the OnSelect property of the button to the following formula:

     

    UpdateContext({FilterValue: "Sorter"})


    Modify the Items property of the gallery to include the filter condition:

     

    Filter('Cleaning-Checklist', Area.Value = FilterValue)

     

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • Morgan_W Profile Picture
    26 on at

    Thank you so much!!! That worked perfectly. 

  • AndrewR1 Profile Picture
    1,572 Moderator on at

    Hi @Morgan_W I would do something like the following: 

     

    So on the on select of your button to set a variable Like: 

    Set(SortVar,"Sorter")

    (You would need to repeat this for each of your buttons)

     

    The Set the Items Property of the Gallery to: 

    Filter('Cleaning-Checklist',SortVar = Area. Value)

    Assuming that both values are text and not a choice field?  

     

    For my example I  used a choice field and I replaced the = with in operator but this is the same concept: 

    AndrewR1_0-1695976013560.png

     

    AndrewR1_1-1695976025797.png

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution. If the content was useful in other ways, please consider giving it Thumbs Up.


    Thanks
    Andrew

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard