
Announcements
I have a powerapps gallery with SharePoint as the datasource. Currently amount filter is working fine in gallery without any issues as per below screenshot and below code.
Items property of Main gallery
Filter(
Items,(
IsBlank(varcheckedGal) ||
Switch(
varcheckedGal,
"Under $50",
Amount >= 0 && Amount < 50,
"$50 - $100",
Amount >= 50 && Amount < 100,
"$100 - $200",
Amount >= 100 && Amount < 200,
"Above $200",
Amount >= 200
)
Filter by Amount Gallery - Items Property
Distinct(Filter(Filter,Amount),Amount)
Filter by Amount Gallery - OnCheck Property
UpdateContext({varchecked:Gallery3_1.Selected.Value})
Filter by Amount Gallery - OnUnCheck Property
UpdateContext({varchecked:Blank()})
Till this, the above code works without any issues. Now i have added a Select All checkbox in the above image and made changes to the below code, but Select All functionality is not working fine. May i know what changes has to be done to the code?
Select All Amount Checkbox - OnCheck
ForAll(Gallery5_1.AllItems, UpdateContext({varcheckedGal:Gallery5_1.Selected.Value}))
Select All Amount Checkbox - OnUnCheck
ForAll(Gallery5_1.AllItems, UpdateContext({varcheckedGal:Blank()))