web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter collection base...
Power Apps
Answered

Filter collection based on multiple toggle switches...

(0) ShareShare
ReportReport
Posted on by

Alright, here is another one I'm sure my syntax is destroying me on. 

 

I have 5 toggles that are I want to use to determine what records I see in my gallery.  Each toggle represents a "TYPE" of asset.  In my SharePoint list, I have added a column to classify each asset according to the types available.

 

I would like the user to be able to switch any combination of the toggles to view different combination of records rather than ALL records or just a single type.  

 

I know you pros have the answer to this one. Please and thanks!

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    Ok, this is as close as I think I'm going to get.  I am able to show all my records or as few by choice with the toggles.  On the other hand, now my search box has been omitted from the Filter process.  I know my syntax is probably crap, but any help would launch me back on track....

    Gallery Item:

     

    Filter(colCombined,
    If(Toggle1.Value,'Unit Class'.Value="Chiller") ||
    If(Toggle1_1.Value,'Unit Class'.Value="AC")||
    If(Toggle1_2.Value,'Unit Class'.Value="Air Handler")||
    If(Toggle1_3.Value,'Unit Class'.Value="Cooling Tower")||
    If(Toggle1_4.Value,'Unit Class'.Value="Trailer")||
    If(Toggle1_5.Value,'Unit Class'.Value="Chiller" & "AC" & "Air Handler" & "Cooling Tower" & "Trailer"),
    StartsWith(Title,SearchBar.Text))
     
     
     
     
     
     
     
     
     
     
  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @Anonymous ,

     

    Would you like to filter the gallery by toggle values which are SP list choice column values?

     

    If so, I made a test on my end. Please see below gif and check if it is what you want:

    Toggles.gif

     

    Steps as follows:

    1\ Set OnCheck of each Toggle, eg. Chiller Toggle:

    Collect(colClass,"Chiller")

     

    2\ Set OnUncheck of each Toggle, eg. Chiller Toggle:

    RemoveIf(colClass,Value = "Chiller")

     

    3\ Items of the Gallery:

    Filter(Filter(YourSPlist,If(Toggle2.Value,true,'Unit Class'.Value in colClass.Value)),StartsWith(Title,SearchBar.Text))

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Community Power Platform Member Profile Picture
    on at

    Thank you @v-jefferni !  This is a huge help.  Never thought to do a nested filter.  I'm learning still, and from the best of the best it sounds like.  Thanks again!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard