I have powerapps with SharePoint as the datasource. I have 2 filters i.e. by category and by price.
When i filter by single category, it works fine. However if i select multiple categories at a time, filter doesnt work.
Each filter is a button.
Also, i want to combine category filter with pricing filter. Any idea how to achieve this?
Below is the code on
Gallery Items property
If(
varSelection = "All"||varSelection=Blank(),
Filter(
Items,
(TextInput1.Text in 'Item Name' || TextInput1.Text in Description || TextInput1.Text in 'Price' || TextInput1.Text in 'Category')
),
Filter(
Items,
(TextInput1.Text in 'Item Name' || TextInput1.Text in Description || TextInput1.Text in 'Price' || TextInput1.Text in 'Category') && varSelection = 'Category'
)
)
Each Button OnSelect
UpdateContext({varSelection:"Others"})
UpdateContext({varSelection:"Wine and Spirits"})
UpdateContext({varSelection:"Luxury Goods"})
Filter Screenshot
Hi @Iantaylor2050 ,
I do not believe you will do this with buttons (how do you unselect and you would need multiple Variables). If you have a Multi-select Combo Box with the Items
[
"All",
"Others",
"Luxury Goods",
"Wine and Spirits"
]
then the Items of the Gallery
Filter(
Items,
(
TextInput1.Text in 'Item Name' ||
TextInput1.Text in Description ||
TextInput1.Text in 'Price' ||
TextInput1.Text in 'Category'
) &&
(
(
"All" in cbName.SelectedItems ||
IsEmpty(cbName.SelectedItems
) ||
cbSelectedItems in Category
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
WarrenBelz
110
Most Valuable Professional
MS.Ragavendar
81
stampcoin
54