conditional filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
1 . Create a filter where the Incident was created after the user’s hire date
2. create a filter to display incidents that were resolved more than 30 days ago.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @arishsaifi9
Added sample
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Responses inline:
1 . Create a filter where the Incident was created after the user’s hire date
-> for this you will require scripted report with filter condition as INC doesn't hold the Caller's Hire Date
create client callable script include i.e. classless one with sandbox enabled and return INC sysIds satisfying your condition
then in report filter condition give like this
Sys ID [IS ONE OF] javascript: getIncidents()
function getIncidents() {
var callerId = gs.getUserID(); // Change to specific caller sys_id if needed
var userGr = new GlideRecord('sys_user');
if (userGr.get(callerId)) {
var hireDate = userGr.getValue('u_hire_date'); // Adjust field name if different (e.g., hire_date)
if (hireDate) {
var incGr = new GlideRecord('incident');
incGr.addQuery('caller_id', callerId);
incGr.addQuery('sys_created_on', '>=', hireDate);
incGr.query();
var sysIds = [];
while (incGr.next()) {
sysIds.push(incGr.sys_id.toString());
}
return sysIds.toString();
} else {
return '';
}
}
}
Configuring Script sandbox property
2. create a filter to display incidents that were resolved more than 30 days ago. -> this is easy with this filter condition
I hope this will get you started.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader

