I have a powerapps gallery with SharePoint as the datasource. I need to filter gallery based on the single select combobox selection.
Combobox has 3 values. Users can filter by any of these 3 choices.
- Checked Items - Should only show checked items from gallery
- Unchecked Items - Should only show unchecked items from gallery
- All - Should show both checked and unchecked items from gallery
Below is the screenshot of the gallery and Items property code of the gallery.
I tried to modify the Items property of the gallery but it doesnt filter properly. May i know where I am going wrong?
App.OnStart
ClearCollect(
colListData1,
AddColumns(
Items,
"checkBoxVal",
false
)
)
Gallery Items Property
If(
Len(SearchText_3.Text) = 0,
colListData1,
Filter(
colListData1,
SearchText_3.Text in 'Item Name' || SearchText_3.Text in Qty || SearchText_3.Text in 'Unit Price'
)
)
Gallery Checkbox1 OnCheck
UpdateIf(
colListData1,
ID = ThisItem.ID,
{checkBoxVal: true}
)
Gallery Checkbox1 OnUnCheck
UpdateIf(
colListData1,
ID = ThisItem.ID,
{checkBoxVal: false}
)
Gallery Checkbox1 default
ThisItem.checkBoxVal
