cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powerapps890
Post Prodigy
Post Prodigy

Filter using combobox

Filter(
collUATMasterData,
C5 = "Sales",
If(
IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All items",
true,
C5 in ComboBox1_2.SelectedItems
) && If(
IsBlank(Filter_1.Text),
true,
Filter_1.Text in C2
) && If(
IsBlank(Filter.Text),
true,
Filter.Text in C6
) && (C4 in ComboBox1_3.SelectedItems)
)

This is what i have in my gallery. The issue is the last line combobox1_3. For all the other comboboxes I pull from the datasource, but for this I enter it manually. When I add the last statement the filter doesn't work. Say the combobox has ["blue", "green", "red"] In my datasource the column C4 also has those values. The items are blank when I add the last line and I am not sure why. The reason I am doing this and is because I am using the same datasource in different views and the combobox is picking up the other values I have filtered out.

2 REPLIES 2
StalinPonnusamy
Community Champion
Community Champion

Hi @powerapps890 

 

Please try this

 

Filter(
collUATMasterData,
C5 = "Sales",
If(
IsBlank(ComboBox1_2.Selected.Result) || ComboBox1_2.Selected.Result = "All items",
true,
C5 in ComboBox1_2.SelectedItems
) && If(
IsBlank(Filter_1.Text),
true,
Filter_1.Text in C2
) && If(
IsBlank(Filter.Text),
true,
Filter.Text in C6
) && (IsEmpty(ComboBox1_3.SelectedItems) || C4 in ComboBox1_3.SelectedItems.Value)
)

 

StalinPonnusamy
Community Champion
Community Champion

Hi @powerapps890 


Please let us know if anything needs on your post. We can help with this.

Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

Thanks,
Stalin - Learn To Illuminate

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,926)