The WixDataFilter
functions enable you to filter and control which results are returned by a dataset when the
setFilter()
function is applied.
A filter is used to control which data is contained in a dataset on your page.
Typically, you build a filter using the filter()
function, refine the filter with WixDataFilter
functions, and then apply the filter to the dataset using the setFilter()
function.
For example, the following code shows a filter on a dataset that is connected to a collection containing customer data. The filter includes only customers over the age of 20:
1
When working with Wix app collections, check which fields can be used in a filter.