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)