not( )


Adds an not condition to the query.

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

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

Method Declaration
Copy
function not(query: ContactsQueryBuilder): ContactsQueryBuilder;
Method Parameters

Contains functionality for refining a contacts query. The ContactsQueryBuilder functions enable you to run, sort, filter, and control which results a query returns.

Typically, you build a query using queryContacts() function, refine the query by chaining ContactsQueryBuilder functions, and then execute the query by chaining the find() function.

Returns
JavaScript
const newQuery = query1.not(query2);
Errors

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

Did this help?