Refines a query or filter to match items whose specified property value ends with a specified string.
The endsWith()
function refines a WixDataQuery
or WixDataFilter
to only
match items where the value of the specified property ends with the specified
string
. Matching with endsWith()
is not case sensitive, so "TEXT"
ends
with "ext"
.
You can only use endsWith()
with a property whose value is a String or Reference.
When using a Reference, endsWith()
matches by the ID of the referenced item as Strings.
function endsWith(propertyName: string, string: string): WixDataQuery;
The property whose value will be compared with the string.
The string to look for at the end of the specified property value.
let newQuery = query.endsWith("last_name", "z");
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.