I'm working on an apps with PowerApps. I need to filter a gallery with multiple input and I need to filter with multiple choices with one combobox. My problem is that if the choices aren't made in the same order than the stored values, the item won't be taken with.
Example : Math and IT are selected in this order (Math,IT) and the values in my items are (IT,Math), my items won't be taken with.
I used this code to do this, but it doesn't work like I want to.
Concat(
ComboBox2_4.SelectedItems.Value,
Concatenate(
Text(Value),
", "
)
) in Concat(
'Subjects'.Value,
Concatenate(
Text(Value),
", "
)
)
How can I write this filter to work around this problem and take items even if the value aren't in the same order ?
You cannot do the filter using the 'in' operator here because what you are comparing is treated as a single string ,so there is nothing that matches (Math,IT) with (IT,Math),but if you choose the option as (IT,Math) and do the same comparison it will work as expected.
Just try out comparing as :
ForAll(ComboBox2_4.SelectedItems.Subject, If Subject in Subjects,true,false),
this will return you true or false based on whether the selected value exists in the table compared against.
where ComboBox2_4.SelectedItems.Subject is the column used in combobox. Subject is the value used in the above line & Subjects is the table column you compare against