cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Filter gallery from dropdown only if toggle true

I have been trying to solve this for a few hours but my knowledge is not enough to crack this.

 

I have a sharepoint list and display it in a Gallery. 

 

I have a Search box, 2 slider and 3 drop downs to filter the Gallery. So far this works fine and as desired.

Filter('Inlay Selector',

DropdownVendor.Selected.Value = Vendor.Value,

DropdownIC.Selected.Value = 'IC Vendor'.Value,

DropdownICFamily.Selected.Value = 'IC Family'.Value,

Slider1.Value >= 'Antenna Width mm',

Slider1_1.Value >= 'Antenna Height mm',

SearchBox.Text in 'Vendor Product Code' Or SearchBox.Text in 'Antenna Width mm')

 

Now I would like to use 3 toggle, so certain filter criteria won't be applied; my intention is to allow the user to disable each of the Dropdowns, so results are not filtered.

 

Filter('Inlay Selector',

If(Toggle2.Value,DropdownVendor.Selected.Value = Vendor.Value),

If(Toggle2_2.Value,DropdownIC.Selected.Value = 'IC Vendor'.Value),

If(Toggle2_1.Value,DropdownICFamily.Selected.Value = 'IC Family'.Value),

Slider1.Value >= 'Antenna Width mm',

Slider1_1.Value >= 'Antenna Height mm',

SearchBox.Text in 'Vendor Product Code' Or SearchBox.Text in 'Antenna Width mm')

 

Is there a good way to do this? What I created doesn't work. If I toggle any of the three toggles off, the gallery is empty.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

So do you want to apply the filter if the toggles are true or if the are false?

 

You can do it without if’s by using or. This should work:

 

Filter('Inlay Selector',

!Toggle2.Value||DropdownVendor.Selected.Value = Vendor.Value,

!Toggle2_2.Value||DropdownIC.Selected.Value = 'IC Vendor'.Value,

!Toggle2_1.Value||DropdownICFamily.Selected.Value = 'IC Family'.Value,

Slider1.Value >= 'Antenna Width mm',

Slider1_1.Value >= 'Antenna Height mm',

SearchBox.Text in 'Vendor Product Code' Or SearchBox.Text in 'Antenna Width mm')

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

So do you want to apply the filter if the toggles are true or if the are false?

 

You can do it without if’s by using or. This should work:

 

Filter('Inlay Selector',

!Toggle2.Value||DropdownVendor.Selected.Value = Vendor.Value,

!Toggle2_2.Value||DropdownIC.Selected.Value = 'IC Vendor'.Value,

!Toggle2_1.Value||DropdownICFamily.Selected.Value = 'IC Family'.Value,

Slider1.Value >= 'Antenna Width mm',

Slider1_1.Value >= 'Antenna Height mm',

SearchBox.Text in 'Vendor Product Code' Or SearchBox.Text in 'Antenna Width mm')

View solution in original post

Highlighted

Genius!!! Thank you so much for your help. You made it look so easy...

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,179)