ServiceNow GlideRecord Or query example (addOrCondition)

 

var gr = new GlideRecord("sys_object_source"); gr.addQuery("name", "SGO-Dynatrace"); var grOR = gr.addQuery("id", "STARTSWITH", "HOST-"); grOR.addOrCondition("id", "STARTSWITH", "PROCESS_GROUP_INSTANCE-"); grOR.addOrCondition("id", "STARTSWITH", "PROCESS_GROUP-"); grOR.addOrCondition("id", "STARTSWITH", "SERVICE-"); grOR.addOrCondition("id", "STARTSWITH", "APPLICATION-"); gr.query(); gs.log(gr.getRowCount(),'fixScr:Ruens test SG');



(ServiceNow)
 
 




 

Comments

Popular posts from this blog

GlideRecord setValue

URL link in addInfoMessage