Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2022 01:42 AM
hi @Supriya KM ,
Please use below script to get the count of incidents which are created on past 3 days.
var ga = new GlideAggregate("incident");
ga.addEncodedQuery('sys_created_onRELATIVEGT@dayofweek@ago@03'); //get incidnets created on last 3days
ga.addAggregate("COUNT");
ga.query();
while (ga.next()) {
gs.info("Total Count is " +ga.getAggregate("COUNT")); //get the count
}
If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
ServiceNow Community MVP 2024.
Thanks,
Pavankumar