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 / Applying filters to bu...
Power Apps
Answered

Applying filters to buttons

(1) ShareShare
ReportReport
Posted on by 67

Hello Community,

2 questions:

I'll keep this simple. 

 

Question 1: I'm building an app in PowerApps.  I have a gallery that lists items in various statuses.  

 

I have 4 buttons and I want them the function as follows:

 

Button 1 - "All" - View all records in the Gallery

Button 2 - "Pending Approval" - View all records that are pending approval

Button 3 - "Approved" - View all records that have been approved

Button 4 - "Assigned" - View all records that have been assigned to a specialist.

 

Question 2:  I have an Edit icon on in the same gallery.  I want users to be able to edit records while in Draft status.  Once the status changes to "pending approval, approval and assigned" status, I want to change the visibility of the Edit Icon to off.

 

Can you help me?

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @heycanyouhelpme 

    You have not mentioned the column that you use for the status.  Is it a choice column or text?  

    I will assume choice for the rest of this response.

     

    In the OnSelect of your buttons, set the formula to:  UpdateContext({lclFilter: "All"})

    Do the same for the others except change the "All" to the other values.

     

    In your Gallery, use the following formula for the Items property:

    Filter(yourDataSource,
     (Coalesce(lclFilter, "All") = "All") || yourStatusColumn.Value = lclFilter
    )

     

    For the Icon, set the DisplayMode property to:

    If(ThisItem.Status = "Draft", 
     Edit,
     Disabled
    )

     

    I hope this is helpful for you.

  • WarrenBelz Profile Picture
    156,378 Most Valuable Professional on at

    Hi @heycanyouhelpme ,

    Assuming some field names here and also that only 1 button can be selected at a time.

    Filter(
     ListName,
     Button1.Value ||
     (Button2.Value && Status = "Pending Approval") ||
     (Button3.Value && Status = "Approved") ||
     (Button4.Value && AssignedColumn = "Specialist")
    )

    The Visible of your edit icon would be 

    ThisItem.Status <> "pending approval && ThisItem.Status <> "approval" && ThisItem.Status <> "assigned"

     

    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. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • heycanyouhelpme Profile Picture
    67 on at

    @RandyHayes Can I apply multiple filters to one button from my choice column using the lcl filter? if so, how?

  • WendeReisss Profile Picture
    253 on at

    @WarrenBelz   @RandyHayes 


    Very nice explanation in your answers above. I have another question: the formula that you explained above filter the column "Status", for example. It's ok, but is it possible do I include others 3 button to filter the colunm "Type" that has 3 specific types (A, B, C types for example)?

    So, a filter that filter Approvals in the colunm "Status", but just to the type A in the colunm "Type". Is it possible to mix button filter?

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

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard