- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2018 05:38 AM
I have a WebServers CI table that holds more than 1500+ CI records. Is there any possible way where I can check the existing Incident, Change, Task tickets related to each CI rather than going into each CI's related list to confirm. Like script or something that can help?
Thanks.
Solved! Go to Solution.
- Labels:
-
Enterprise Asset Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2018 05:51 AM
Hi Rick,
Try using background script as below:
var task1=new GlideRecord('task');
task1.addEncodedQuery('Paste necessary query');
task1.query();
while(task1.next())
{
gs.print('Task number with CI is '+task1.number + '& is an '+task1.sys_class_name);
}
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2018 05:51 AM
Hi Rick,
Try using background script as below:
var task1=new GlideRecord('task');
task1.addEncodedQuery('Paste necessary query');
task1.query();
while(task1.next())
{
gs.print('Task number with CI is '+task1.number + '& is an '+task1.sys_class_name);
}
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2018 05:54 AM
I think you haven't read my question properly.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2018 06:20 AM
You could create a view between your WebServers CI and the task table where the sys_id from the WebServers CI tables = cmdb_ci filed on the task table. Then create a report off the view. Also so you could use it for every CI class you could base the view off the cmdb_ci table instead then you could run the report for any class.