Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Filtering doesn't work.



I would like to filter the gallery objects (which are the SQL view) to be filtered based on ListBox selected items.

The ways I tried to do it:


Filter('[dbo].[xxx]',Prod = ListBox1.SelectedItems)

This line gives an error: "Invalid argument type"



When I do simple filtering based on string Filter('[dbo].[xxx]',Prod = "Food") 

It works correctly.


Level: Powered On

Re: Filtering doesn't work.

Somehow it does work when I use "Selected" instead of "SelectedItems" like:

Filter('[dbo].[xxx]',Prod= ListBox1.Selected.Value)


However it returns data filtered to first selected item (the listbox is a multiselect)

Level 10

Re: Filtering doesn't work.

Do This:


Filter('[dbo].[xxx]',Prod in Concat(ListBox1.SelectedItems,Prod & ","))


Your Listbox has to be set to a datasource for it to work so you could use something like:



on your list item box

Community Support Team
Community Support Team

Re: Filtering doesn't work.

Could you please explain a bit about the ListBox configuration, specially for the items property, and the Value part?



Basically, you should be able to filter the Gallery based on the formula below:

Filter('[dbo].[xxx]',Prod in ListBox1.SelectedItems.FieldName)

The FieldName is the field configured under the Value part.





Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,235)