- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2018 08:13 AM
I've been asked by management to "hide" one of the Assignment Group choices for anyone except users with a specified role. Basically, preventing incidents from being assigned to the highest escalation group prior to being vetted by others.
I took a look at ACLs and know I could use that to hide the entire field, but that's not what I'm wanting.
So I assume what I want is to do a Ref Qualifier and then point to a Script Includes script.
I created a Ref Qualifier:
I'm struggling however with the Script Includes, specifically the proper syntax.
I have Assignment Groups A, B and C. Roles E, F and G.
I'd like Assignment Group A to be visible only to users with Role E. Everyone else can see all other Assignment Groups except A.
So based on my Reference Qualifier, I'd assume my Script Includes would start like this, but can anyone smarter than me please help me finish it? I've been searching for examples to mimic and so far unsuccessful.
function javascript:myGroupFilter() {
//Show All Assignment Groups for Role E
if (gr.userHasRole('Role E'))
return;
//Hide Assignment Group A for All other Roles
???????
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2018 09:26 AM
Hi Bvarian,
Here you go.
function myGroupFilter() {
if (gs.hasRole('PASS ROLE NAME HERE'))
{ // Can see all records
return;
}
else
{
return 'name!=CAB Approval'; //Replace CAB Approval with the exact Assignment group name you would like to hide
}
}
Thanks,
Pradeep Sharma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2018 11:32 AM
You are very welcome Bvarian. Thanks for participating in the community!
-Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2021 12:41 AM
Hi Pradeep,
For me this is not working please find my script include code below
var workgroupprivate = Class.create();
workgroupprivate.prototype = {
initialize: function() {
function myGroupFilter() {
if (gs.getUser().hasRole('u_private_workgroup')) // users with this role can see all records
{
return;
}
else
{
return 'name!=Work Group: Unassigned Tickets'; // Pass the assignment group name that has to be hidden
}
}
},
type: 'workgroupprivate'
};