How are you?
I would like to find an efficient way to filter a datasource in function of a combobox. This combobox has sever options: A, B, C, ... and All. If I choose All, I don't want to apply the filter. I have thought of using the following trick:
Filter(Datasource, If(Combobox.Selected.Value = "All",1=1,Column = Combobox.Selected.Value))
Is there any way to achieve this?
Thank you in advance.
Solved! Go to Solution.
Hi @fernandocxv ,
Could you please share a bit more about your issue?
Is there some error message with your Filter formula?
Further, could you please share a bit more about the column (filter column) you used in your Filter formula? Is it a Single text type column or Choice type column?
Based on the formula you provided, I could not find any syntax error with it. Please consider modify your formula as below:
Combobox.Selected.Value = "All",
Column = Combobox.Selected.Value
If the filtered Column you used in your Filter formula is a Choice type column, please consider modify your formula as below:
Filter( Datasource, If( Combobox.Selected.Value = "All", true, Column.Value = Combobox.Selected.Value ) )
There is no issue, I just was looking for a way in which I avoid using 1=1 in my code. As I can see, it is better solution to use true.
Thank you @v-xida-msft!
Check out new user group experience and if you are a leader please create your group
Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.