- 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 08:22 AM
Hi,
There is something similar already on community that you may find helpful.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2018 08:31 AM
Yes, that's the exact community link I was using to determine that the best approach was the RefQual and Script Includes. I also referenced this Community article. I'm not trying to be helpless; I'm just not nailing the syntax and was hoping to get some assistance from someone more knowledgeable about Java code than me.

- 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:31 AM
Pradeep....that worked like a charm. Thank you so much for the assistance!