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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.