Write a script to print Incident count based on priority.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 02:33 AM
Below is my script which is not giving expected O/P.
var gr = new GlideAggregate('incident');
gr.groupBy('priority');
gr.query();
var count = 0;
while(gr.next()){
gs.info(gr.priority);
count = count + 1;
gs.info('Count is ' + count);
}
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 10:16 PM