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 filter.

A filter with an and condition returns all items that meet the conditions defined on both sides of the condition.

Use the and() method when performing compound queries. For example, the final filter 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

Notes:

  • The and() method is designed to work with 2 or more queries or filters. If used with a single query or filter, it returns all items in a collection.
  • When chaining multiple WixDataFilter methods to a filter, an and condition is implied. In such cases, you do not need to call the and() method explicitly. For example, this filter returns results where an item status is active and age is greater than 25:
Copy
Method Declaration
Copy
Method Parameters
filterWixDataFilterRequired

WixDataFilter used with an and condition.

Returns
Return Type:WixDataFilter
Did this help?