ne( )


Refines a query or filter to match items whose specified property value does not equal the specified value.

The ne() function refines a WixDataQuery or WixDataFilter to only match items where the value of the specified property does not equal the specified value.

It only matches values of the same type. For example, a number value stored as a String type is considered not equal to the same number stored as a Number type.

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

If the value of the propertyName property is an Array, ne() includes items in which none of the elements of the Array match the specified value.

Method Declaration
Copy
Method Parameters
propertyNamestringRequired

The property whose value will be compared with value.


valueanyRequired

The value to match against.

Returns
Return Type:WixDataQuery
JavaScript
Did this help?

not( )


Adds a not condition to the query or filter.

The not() function adds a not condition to a WixDataQuery or WixDataFilter. A query or filter with a not returns all the items that match the query or filter as defined up to the not function, but don't match the query or filter passed to the not function.

If the query or filter only contains a not() function, it returns all the items that don't match the query defined by the not method.

The collections referenced by both the initial query and the query passed to the not function must be the same.

Method Declaration
Copy
Method Parameters
queryWixDataQueryRequired

A query to add to the initial query as a not condition.

Returns
Return Type:WixDataQuery
JavaScript
Did this help?

or( )


Adds an or condition to the query or filter.

The or() function adds an inclusive or condition to a WixDataQuery or WixDataFilter. A query or filter with an or returns all the items that match the query or filter as defined up to the or function, the items that match the query or filter passed to the or function, and the items that match both.

The collections used by both the initial query and the query passed to the or function must be the same.

The 'or()' function is designed to work with 2 or more queries or filters. If you use it on its own, it will return all the items in a collection.

Method Declaration
Copy
function or(query: WixDataQuery): WixDataQuery;
Method Parameters
queryWixDataQueryRequired

A query to add to the initial query as an or condition.

Returns
Return Type:WixDataQuery
JavaScript
let newQuery = query1.or(query2);
Did this help?