- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 06:28 AM
Hi All,
I m having a script include to return the group members of assignment group, and below is the script.
I need to call in the report and trying like below but not working. Please guide in how to call script include in report
getSDgroupmembers: function()
{
var members = [];
var SDeskDK = gs.getProperty('ServiceDeskRemote');
var grmebr = new GlideRecord('sys_user_grmember');
grmebr.addQuery('group',SDeskDK);
grmebr.query();
while(grmebr.next())
{
members.push(grmebr.user.getDisplayValue());
}
return members;
},
type: 'ServiceDeskGroupMembers'
In the report, it is called as below and report is on incident metric table.
Value is javascript:new ServiceDeskGroupMembers().getSDgroupmembers() AND
Definition is Assigned to duration
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 06:37 AM
Hello @Priyanka145
* Is the script include client callable? SI should be client callable to be used in condition builder.
* script update:
return members.join(",");
* Try updating condition as
Value is one of javascript:new ServiceDeskGroupMembers().getSDgroupmembers() AND
Definition is Assigned to duration
Also run below script in background script and check if you are able to get the details as expected.
gs.print(new ServiceDeskGroupMembers().getSDgroupmembers());
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 06:33 AM
Can you please share the screenshot of report? Need to see how are you using it in filters.
Regards,Sushant Malsure

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 06:37 AM
Hello @Priyanka145
* Is the script include client callable? SI should be client callable to be used in condition builder.
* script update:
return members.join(",");
* Try updating condition as
Value is one of javascript:new ServiceDeskGroupMembers().getSDgroupmembers() AND
Definition is Assigned to duration
Also run below script in background script and check if you are able to get the details as expected.
gs.print(new ServiceDeskGroupMembers().getSDgroupmembers());
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 07:40 AM
Hi @Ahmmedali
The same script include when I tried in background script, it has returned the members of the group
Over the report I tried modifying as you suggested and also updated the script return members.join(","); . But it didnt work.
Client callable is checked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2023 07:46 AM
can you please share the screenshot of report showing how you are using it?
Regards,Sushant Malsure