Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

what is the difference between add query and add encoded query?

rajaa
Giga Contributor

o

5 REPLIES 5

Shashank Vashi1
Mega Guru

Please refer to the below code:


var filterQuery = "number="INC0001"^priority="1";


var gr = GlideRecord('u_updates');


gr.addEncodedQuery(filterQuery);


gr.query();



In this way you can run an encoded query with multiple conditions however in addquery you pass only one condition in one addquery.