between( )


Developer Preview

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

Refines a filter to match items whose specified field value is within the defined range.

The between() method refines this filter to match items for which the value of the specified field is greater than or equal to rangeStart and less than rangeEnd. The method only matches values of the same type.

The following types can be compared:

  • Number: Compared numerically.
  • Date: Compared as JavaScript Date objects.
  • String: Compared lexicographically:
    • "A" and "M" are considered between "A" and "Z", but "a", "m", "z" and "Z" are not.
    • "A", "M", "Z", and "a" are considered between "A" and "z", but "z" is not.

Note: Items that do not have a value for the specified field are considered as the lowest comparable value and are ranked last.

Method Declaration
Copy
Method Parameters
fieldstringRequired

Field to compare with rangeStart and rangeEnd.


rangeStartunionRequired

Starting value of the range to match.


rangeEndunionRequired

Ending value of the range to match.

Returns
Return Type:WixDataFilter
Did this help?