hasSome( )


Refines a query or filter to match items whose specified property value equals any of the specified value parameters.

The hasSome() function refines a WixDataQuery or WixDataFilter to only match items where the value of the specified property equals any of the specified values.

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

If the value of the specified property is an array, hasSome() will match if any of the elements of that array match any of the specified values.

If the specified property contains multiple references, pass item IDs in the value property. In such a case, hasSome() will match if any of the multiple references match any of the specified ID values.

You can specify a list of values to match by providing an array of String, Number, or Date types as the value parameters.

Method Declaration
Copy
Method Parameters
propertyNamestringRequired

The property whose value will be compared with value.


valueunionRequired

The values to match against.

Returns
Return Type:WixDataQuery
JavaScript
Did this help?

isEmpty( )


Refines a query or filter to match items whose specified property does not exist or does not have any value.

The isEmpty() function refines a WixDataQuery or WixDataFilter to only match items where the value of the specified property is null or undefined or the property does not exist.

If the property contains any value at all for a given item, including the empty string or an invalid value, that item will match the query.

Method Declaration
Copy
Method Parameters
propertyNamestringRequired

The the property in which to check for a value.

Returns
Return Type:WixDataQuery
JavaScript
Did this help?

isNotEmpty( )


Refines a query or filter to match items whose specified property has any value.

The isNotEmpty() function refines a WixDataQuery or WixDataFilter to only match items where the value of the specified property is not null or undefined.

If the property contains any value at all for a given item, including the empty string or an invalid value, that item will match the query.

Method Declaration
Copy
function isNotEmpty(propertyName: string): WixDataQuery;
Method Parameters
propertyNamestringRequired

The property in which to check for a value.

Returns
Return Type:WixDataQuery
JavaScript
let newQuery = query.isNotEmpty("bio");
Did this help?