how to get count of total incidents in system logged
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 05:23 AM
Total count of incident/SRs in system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 05:26 AM
You to navigate to any table and check the total count.
Let me know your requirement in details, where/how you want this count
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 05:31 AM
I need the code to get the total count of the incidents/SRs logged in the system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 05:41 AM
Hi Mahesh,
Try this in Background script : It gives total number of incidents
var count = new GlideAggregate('incident');
count.addAggregate('COUNT');
count.query();
if(count.next()) {
gs.print(count.getAggregate('COUNT'));
}
Thanks,
Syed Farhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 05:43 AM
Hi Mahesh,
You can have a script like this to run in Background script or where ever you want.
var gr = new GlideRecord("table_name");
gr.query();
var count = gr.getRowCount();
gs.log(count);