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

palanikumar
Mega Sage

Hello @Jacob64 ,

 

You can use the below condition:

type=1cb8ab9bff500200158bffffffffff62^active=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744

 

 

Thank you,
Palani

Hi @palanikumar  

Sorry but that does n't work for me'.
Applying this shows only groups of the filtered type that are active, but not groups to which the assigned it is a member of.
assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744 seems to me also a bit wierd to use.
Is the number behind DYNAMIC perhaps a sys_id? (which will be instance unique?)
If that is a sys_id, what sys_id might that be?
Perhaps I can you my own local sys_id?



Preview
 
 
 

Hi @Jacob64 ,

 

assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744 is Out of box solution from ServiceNow. This condition will get all the groups where current user is member of. 

 

You can generate this condition yourself but using the below steps:

1) Go to List view of Change module.

2) From the filter select Assignment Group -> In operator select "is (dynamic)" - this the last option -> In the value field select "One of My Group" in the drop down.

3) You can also add other conditions required for your code

4) Once you created the filter, hit the run it and ensure you see the the expected data.

5) From the condition Bread Crumb, you can right click and -> copy query.

Paste your query in notepad you will find the same condition I shared. This can be used as encodedquery 

 

Thank you,
Palani

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