contains( )


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 query to match items whose specified field value contains a specified value.

The contains() method refines this query to only match items where the value of the specified field contains the specified value. Matching with contains() is not case sensitive, so "text" does contain "Tex".

You can use contains() with a field of type string or reference. When specifying a field of type reference, contains() matches by the ID of the referenced item as a string.

Method Declaration
Copy
Method Parameters
fieldstringRequired

Field whose value is compared with the specified value.


valuestringRequired

The string to look for inside the specified field value.

Returns
Return Type:WixDataQuery
Errors

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

Did this help?