Available query operators

We can use the following 13 different JavaScript operators in the addQuery method:

Operator

Type

Code example

=

Value of field must be equal to value supplied

addQuery('priority', '=' , 2);

>

Value of field must be greater than value supplied

addQuery('priority', '>', 1);

<

Value of field must be less than value supplied

addQuery('priortiy', '<', 3);

>=

Value of field must be equal or greater than value supplied

addQuery('priority', '>=', '2');

<=

Value of field must be equal or less than value supplied

addQuery('priority', '>=', '2');

!=

Value of field must not be equal to the value supplied

addQuery('priority', '!=', '1');

STARTSWITH

Value of field must ...

Get ServiceNow Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.