- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 12:58 AM
I am using javascript:'sys_idIN' + new CIUtils().servicesAffectedByCI(current.cmdb_ci) ,into reference qualifier to call OOTB script include but did not get meaning of "sys_IDIN". can anyone answer? Thank You in advance
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 11:15 AM
At a high level, what you are doing is creating a dynamic reference qualifier that you are building with that javascript.
sy_idIN is the query that checks the current sys ID and sees if it is IN the following array. That array comes from:
new CIUtils().servicesAffectedByCI(current.cmdb_ci) -> This returns a array of all the sys IDs of CI's affects by the passed in current.cmdb_ci. https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_reference/CIUtils/concept/c_CIUtilsAPI.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 11:15 AM
sys_IDIN evaluates to sys_id is one of 'sys_id 1, sys_id 2, sys_id 3'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 11:15 AM
At a high level, what you are doing is creating a dynamic reference qualifier that you are building with that javascript.
sy_idIN is the query that checks the current sys ID and sees if it is IN the following array. That array comes from:
new CIUtils().servicesAffectedByCI(current.cmdb_ci) -> This returns a array of all the sys IDs of CI's affects by the passed in current.cmdb_ci. https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_reference/CIUtils/concept/c_CIUtilsAPI.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2018 01:39 AM
Thank u for sharing information,shared link is very helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 11:20 AM
IN is Query String operator. Other examples of operator ...
- =
- !=
- IN
- NOT IN
- STARTSWITH
- ENDSWITH
- CONTAINS
- DOES NOT CONTAIN
- INSTANCEOF
Example
var gr = new GlideRecord('incident');
gr.addQuery('number','IN','INC00001,INC00002');
gr.query();
while(gr.next()) {
//do something....
}