cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ImageZ
Regular Visitor

Filtering Gallery

Hey,

 

Seen similar posts but not quite what I'm after.

 

Effectively, I have a gallery which I'd like to filter with 5 buttons but can't get the IF statement on the Gallery Items correct!

 

Button 1 - Column "Interviewer" is blank

Button 2 = Column "Note Taker" is blank

Button 3 =  Column "Channel" is "Direct"

Button 4 = Column "Accepted" is true

Button 5 = Clear all filters.

 

Many thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @ImageZ ,

Set a Variable on each button

UpdateContext({varFilter: 1})

and so on for each button - also at Screen OnVisible and on Button 5

UpdateContext({varFilter: 5})

Then your Filter

Filter(
   DataSource,
   varFilter = 5 ||
   (varFilter = 1 && Interviewer = Blank()) ||
   (varFilter = 2 && 'Note Taker' = Blank()) ||
   (varFilter = 3 && Channel = "Direct") ||
   (varFilter = 4 && Accepted)
)

 

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

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @ImageZ ,

Set a Variable on each button

UpdateContext({varFilter: 1})

and so on for each button - also at Screen OnVisible and on Button 5

UpdateContext({varFilter: 5})

Then your Filter

Filter(
   DataSource,
   varFilter = 5 ||
   (varFilter = 1 && Interviewer = Blank()) ||
   (varFilter = 2 && 'Note Taker' = Blank()) ||
   (varFilter = 3 && Channel = "Direct") ||
   (varFilter = 4 && Accepted)
)

 

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

You sir - are magic.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,073)