- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2019 08:44 PM
Hi all,
I need to create a report to show the Incidents where the caller is also member of the Assignment group when resolved.
Cannot seem to find any condition that would match this criteria, is there any other way i can achieve this?
Thanks.
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2019 10:08 PM
you can create here on client callable script include and write the below code there. and then in list view or report you can add the filter condition like below.
Script Include: Make sure it should be client callable.
var callergrpmem = Class.create();
callergrpmem.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getMember: function(){
var arr =[];
var gr = new GlideRecord('incident');
gr.addQuery('active',true);
gr.addEncodedQuery('assignment_groupISNOTEMPTY');
gr.query();
while(gr.next()){
var grmember = new GlideRecord('sys_user_grmember');
grmember.addQuery('group','IN',gr.assignment_group);
grmember.addQuery('user','IN',gr.caller_id);
grmember.query();
while(grmember.next()){
arr.push(gr.number.toString());
}
}
return arr;
},
type: 'callergrpmem'
});
Filter Condition
Number | Is one Of | javascript: new global.callergrpmem().getMember()
Hope it will help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2019 09:47 PM
Hi Sam,
Are you saying if you login and check the report then it should show incidents where you are the member of the incident assignment group?
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
‎10-27-2019 10:08 PM
you can create here on client callable script include and write the below code there. and then in list view or report you can add the filter condition like below.
Script Include: Make sure it should be client callable.
var callergrpmem = Class.create();
callergrpmem.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getMember: function(){
var arr =[];
var gr = new GlideRecord('incident');
gr.addQuery('active',true);
gr.addEncodedQuery('assignment_groupISNOTEMPTY');
gr.query();
while(gr.next()){
var grmember = new GlideRecord('sys_user_grmember');
grmember.addQuery('group','IN',gr.assignment_group);
grmember.addQuery('user','IN',gr.caller_id);
grmember.query();
while(grmember.next()){
arr.push(gr.number.toString());
}
}
return arr;
},
type: 'callergrpmem'
});
Filter Condition
Number | Is one Of | javascript: new global.callergrpmem().getMember()
Hope it will help you.