Filtering datas to listview

Hi guys !

Does anyone knows how to do that ?

I want to filters documents according to multiple variables. I created a custom function for combining lists but it gives me all the results of those variables in a list and i want only to have the documents that contains the particular variables.

I mean I have a list with sweatshirt, pants etccc and list of colors and user has to select if he wants red pants for example BUT when I use my custom function it gives me all the red stuff and all the pants instead of red pants.

I need help pleaseee

1