Sep 8, 2020 in Service Now
Q: How will you get all the records where the incident is having category as hardware or software in Servicenow?

2 Answers

0 votes
Sep 8, 2020

Use addOrCondition(String name, String oper, Object value) .
Example :
var gr = new GlideRecord(‘incident’);
var qc = gr.addQuery(‘category’, ‘hardware’);
qc.addOrCondition(‘category’, ‘software’);

0 votes
Sep 8, 2020

By default queries with the invalid field, names run but ignore the invalid condition. For more strict query control you can enable the glide.invalid_query.returns_no_rows property which will result in an empty result set for invalid queries.

Click here to read more about Service Now
Click here to read more about Insurance

Related questions

0 votes
Aug 28, 2020 in Service Now