and( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Adds an and condition to the query or filter.

The and() method adds an and condition to this query. A query or filter with an and returns all the items that match the query or filter as defined up to the and method and also match the query or filter passed to the and method.

Note that when chaining multiple WixDataFilter methods to a query an and condition is assumed. In such cases, you do not need to add a call to the and() method. For example, this query returns results where status is active and age is greater than 25.

Copy

The and() method is needed when performing compound queries. For example, the final query in this set of queries returns results where status is either pending or rejected and age is either less than 25 or greater than 65.

Copy

The and() method is designed to work with 2 or more queries or filters. When used on its own, it returns all the items in a collection.

Method Declaration
Copy
Method Parameters
filterWixDataFilterRequired

Filter to add to the initial query as an and condition.

Returns
Return Type:WixDataQuery
Did this help?