additional filtering on advanced ref qualifier: assignment_group

Bcrant
Tera Contributor

Hello, all.

 

I recently setup an advanced reference qualifier on our assignment_group field to return groups that the assigned_to user is a member of. I'd like to further filter that query to show only a specific group type of "itil" and hoping one of you cold assist. Below is the script we're using...

 

javascript: 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.assigned_to.toString()).getMyGroups())

1 ACCEPTED SOLUTION

AnveshKumar M
Tera Sage
Tera Sage

Hi @Bcrant ,

 

Try the following Reference Qualifier.

 

javascript:'typeLIKE1cb8ab9bff500200158bffffffffff62^sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.assigned_to.toString()).getMyGroups())

 

In the above statement replace : next to javascript with :

 

Please mark my answer helpful and accept as solution if it helped you 👍

 

Thanks,
Anvesh

View solution in original post

5 REPLIES 5

Bcrant
Tera Contributor

@AnveshKumar M 

I ended up modifying it a little more. Once we applied the initial reference qualifier we realized it changed the behavior so that IF assinged_to is empty then ZERO assignment groups would show in the query. Here's the modification we made...

 

javascript: (current.assigned_to ? 'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.assigned_to.toString()).getMyGroups()) : '') + '^type=1cb8ab9bff500200158bffffffffff62^active=true';