
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 03:49 AM
Hi,
My doubt is how to find the count of incidents created in the last 5 min?, is there any way(filter or script) to find the count ?if there is any kindly let me know.
Thanks,
Datta.
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 03:54 AM
Hi,
like this
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 03:54 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 04:07 AM
HI Ankur,
Thanks a lot !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 04:18 AM
Hi, Please use below script
var gr=new GlideRecord("incident");
gr.query();
while(gr.next()){
var dateString1 = new GlideDateTime(gr.sys_created_on); //Created Date
var dateString2 = new GlideDateTime(); // Current Date
var diffSeconds = gs.dateDiff(dateString1, dateString2, true);
diffMins = diffSeconds/60;
var num=Math.round(diffMins);
if(num<=5){ // Equal or within 5 minute
gs.info("number of incident---"+gr.number);
}
}
Mark Helpful, if it will fulfill your requirement