endsWith( )


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 property value ends with a specified value.

The endsWith() method refines this query to only match items where the value of the specified field ends with the specified value. Matching with endsWith() is not case sensitive, so "TEXT" is considered to end with "ext".

You can only use endsWith() with a field of type string or reference. When specifying a field of type reference, endsWith() 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

String to look for at the end of the specified property 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?