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 / Combine toggle button ...
Power Apps
Answered

Combine toggle button with a filter function

(0) ShareShare
ReportReport
Posted on by 197

Goodmorning all,

 

I have a PowerApp with a few fields. I want to use two toggle button to filter a yes/no column and a choice columns.

My filter works fine separately but i can't combine it. How can i use together?

 

Toggle filter.png

Toggle filter 2.png

 

I use this code for the items @ the gallery but after this i won't see all the items. I think first i need to load all the items and with the OnChange from the Toggle use this filter below?

 

Filter(TestPowerApps, If(Toggle2.Value = true, Status.Value="Error")) 
Filter(TestPowerApps, If(Toggle1.Value = true, Paid =true)

 

 

Column paid = yes/no

Column status = choice column

Categories:
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Say toggle1 sets variable1 to true (or false) and toggle2 sets variable2 to true (or false).

    Now set the items property of your gallery to:

    Filter(TestPowerApps, !Toggle2.Value = true || Status.Value="Error", !Toggle1.Value = true || Paid =true)

    Let me know if this works.


    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit Bhatia
    https://thepoweraddict.com
  • WackdeMack Profile Picture
    197 on at

    **bleep**, i was so close 🙂 I only changed the last item to 

    Filter(TestPowerApps, !Toggle2.Value = true || Status.Value="Error", !Toggle1.Value = true || Paid =1)
    

    Paid=1 because true or false doenst work very well with yes/no column. I found this blog about this issue https://rezadorrani.com/index.php/2019/04/14/powerapps-filter-sharepoint-yes-no-column-bug/

     

    @PowerAddict Thanks! 
     

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

    Thanks,
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    Thank you @PowerAddict 

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 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard