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 with ch...
Power Apps
Answered

filter gallery with checkbox

(0) ShareShare
ReportReport
Posted on by 776

Hello Experts,

 

I would like to filter my gallery with current user if they click on a check box

 

Currently I am using this code 

 

SortByColumns(
 Filter(
 'DWP Exceptions Tracker',
 Or(
 StartsWith('Customer Name',InputSearchID.Text),
 ID = Value(InputSearchID.Text),
 StartsWith('Title of Exception',InputSearchID.Text)
 )
 ),
 "Created",
 Descending
)

 

I tried using IF function but it doesn't seems to work, please guide me 

Here is what i was trying 

If(Checkbox2.Value = false,
SortByColumns(
 Filter(
 'DWP Exceptions Tracker',
 Or(
 StartsWith('Customer Name',InputSearchID_1.Text),
 ID = Value(InputSearchID_1.Text),
 StartsWith('Title of Exception',InputSearchID_1.Text)
 )
 ),
 "Created",
 Descending
),SortByColumns(
 Filter(
 'DWP Exceptions Tracker',
 Or(
 StartsWith('Customer Name',InputSearchID_1.Text),
 ID = Value(InputSearchID_1.Text),
 StartsWith('Title of Exception',InputSearchID_1.Text),'Created By'.Email = User().Email
 )
 ),
 "Created",
 Descending
))

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @AshishJaiswal ,

    Try this

    Sort(
     Filter(
     'DWP Exceptions Tracker',
     (
     StartsWith(
     'Customer Name',
     InputSearchID_1.Text
     ) ||
     ID = Value(InputSearchID_1.Text) ||
     StartsWith(
     'Title of Exception',
     InputSearchID_1.Text
     )
     ) &&
     ( 
     !Checkbox2.Value ||
     'Created By'.Email = User().Email
     )
     ),
     Created,
     Descending
    )

     

    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

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

    Hi @AshishJaiswal ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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

  • AshishJaiswal Profile Picture
    776 on at

    Hello @WarrenBelz 

     

    Only Checkbox work

     

    other then that search with customer name column, Title of Request column and ID column does not work

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

    Hi @AshishJaiswal ,

    The code is valid providing the and/or bracketing is what you need - please check this.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard