sho only assgnment groups where the assigned to user is a member off

Jacob64
Kilo Guru

To make live of  certain users that are less experenced with servicenow easier I want to show only assignment groups where the Assigned to is a member of.

To complete my quest i have the following requirements:
- Assignmenet group field shows only groups where the "Assigned to" is a member off

- The assignment group is active

- The assignment group is of a certain type.

I want to use this on the change form but the current reference qualifier is ootb and grayed out. I can only chnage re reference qualifier it self and have been able to comply to the last 2 requirements but not to the first one.

I now use the following:

 

type=1cb8ab9bff500200158bffffffffff62^active=true^assignment_group=group_member

That gives me the right type and related active groups but also groups the assigned to is not a member off.

 So my question is: how can can i change the qualifier and make only assgnoments groups visible where the populated assigned to user is a member of.

Can anyone help me out here?

Many thanks in advance 

Kind regards
Jacob.

 

1 ACCEPTED SOLUTION

Hi @Jacob64 ,

Just realized your requirement. You want the groups where the assigned to user is member of.

 

You can refer the below script recommended by ServiceNow:

https://www.servicenow.com/docs/bundle/vancouver-platform-administration/page/script/server-scriptin...

 

Thank you,
Palani

View solution in original post

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@Jacob64 

If you are doing on OOTB assignment_group field on task table and for your task extended table then remember you will have to use dictionary override and you should not touch the OOTB reference qualifier on assignment_group field

try this in the dictionary override for your table

Do this

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

AnkurBawiskar_0-1747755223576.png

AnkurBawiskar_0-1747755450421.png

 

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Jacob64 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Jacob64 

the logic and script I shared above should also work fine.

Did you try that?

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader