Need to have multiple layers to a setFilter on a dataset...

I’m setting up a search on the site and need to have multiple layers to the filter. There’s several text fields that need to be added to the search filter, but a ‘base’ filter that needs to be applied regardless of what (if any) terms are typed in.

Section 1:

.contains(“baseCategorySelected”, userSelectedCategory)
AND [if not subscribed]:
.eq(“isFree”, true)

THEN
Section 2:

.contains(“Column 1”, terms)
or
.contains(“Column 2”, terms)
or
.contains(“Column 3”, terms)

Hey,

You can certainly create a filter to do what you want. Filters can be quite complex and are very flexible. Take a look at wix-data.WixDataFilter for full details on what can go into a filter. I would suggest you specifically review the section on the or() filter .

Good luck,

Yisrael