Record updated by
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello,
I would like to make a report on INC not updated by itil role last 5 days. Is it possible and how?
Best regards,
Nenad
Labels:
- Labels:
-
Incident Management
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
not straight forward to achieve this
You can use scripted approach and use script in report filter conditions
1) create classless script include like this
function getIncidents() {
var arr = [];
var gr = new GlideRecord('incident');
gr.addActiveQuery();
gr.addQuery('sys_updated_on', '<=', gs.daysAgoStart(5));
gr.query();
var count = 0;
while (gr.next()) {
var updater = gr.sys_updated_by;
if (updater) {
var ugr = new GlideRecord('sys_user_has_role');
ugr.addQuery('user.user_name', updater);
ugr.addQuery('role.name', 'itil');
ugr.query();
if (!ugr.hasNext()) {
arr.push(gr.getUniqueValue())
}
}
}
return arr.toString();
}
2) then call like this Sys ID [IS ONE OF] javascript: getIncidents();
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
