hasSome( )


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 search to match items where the value of the specified field equals any of the specified values.

The hasSome() method refines the search to only match items where the value of the specified field equals any of the specified values.

Matching strings with hasSome() is case-sensitive, so "text" is not considered equal to "Text".

If the specified field contains an array, hasSome() matches items where any of the array's elements match any of the specified values.

If the specified field contains multiple references, pass item IDs as the values. hasSome() matches if any of the references match any of the specified ID values.

You can specify multiple values to match by providing an array of strings, numbers, or dates.

Method Declaration
Copy
Method Parameters
fieldstringRequired

Field whose value is compared with the specified values.


valuesunionRequired

Values to match.

Returns
Return Type:WixDataSearch
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?