cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MalyMajo
Helper I
Helper I

Filter gallery by multiple buttons

Hello all,

 

I have a gallery with billing tracker, which I would like to filter based on "quick" filters - buttons below the gallery.

 

In buttons I have set 2 boolean context variables filterOpen (for not sent invoices) and filterMyRequests to filter only requests by current user. Buttons Onselect properties are set as following:

UpdateContext({filterOpen: !filterOpen})

UpdateContext({filterOpen: !filterOpen})

 

I am struggling with setting the Gallery Items to show correct result. Below code is bet what I got, but it does not work as expected. When I select only one button, it works. But when I select both, result is whole table 

Filter(
    colBillings,
    If(
        filterOpen,
        DocumentStatus <> "Sent"
    ) || If(
        filterMyRequests,
        varUser.Email = RequestedBy.Email
    )
)

 

1 REPLY 1
Nogueira1306
Super User
Super User

See if this helps:

 

https://www.youtube.com/watch?v=SJqbYa8Tqpk&t=58s

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,

Gonçalo Nogueira

Check my LinkedIn!

My website!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,643)