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.
Solved! Go to Solution.
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')
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')
Genius!!! Thank you so much for your help. You made it look so easy...
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
183 | |
46 | |
46 | |
34 | |
33 |
User | Count |
---|---|
260 | |
87 | |
79 | |
68 | |
67 |