Assignment group select group user only display in assigned to

sk adamshafi
Kilo Explorer

Assignment group select group user only display in assigned to 

3 REPLIES 3

Raj_Esh
Kilo Sage
Kilo Sage

Hi Adamshafi,

 

Your question is not clear, can you elaborate more. Maybe you can paste the screenshot, on which you're looking for the help.

 

Thanks,

Raj

--Raj

Sourabh26
Giga Guru

Hi,

 

Use the On Demand Script Include in this case as below.

 

Script Include - 

Name - GroupToUser(same as function name)

function GroupToUser()
{
	var a=[];
	var gr = new GlideRecord('sys_user_grmember');//sys_group_has_role
	gr.addEncodedQuery('group='+current.assignment_group);
	gr.query();
	while(gr.next())
	{
		a.push(gr.getValue('user'));
	}
	return 'sys_idIN'+a;
}

 

Now call this script include in your Assigned To field (to get only those user who are part of selected assignment group).

Assigned To --> Configure Dictionary --> Reference Specification (Advanced) 

javascript:global.GroupToUser();

 

Mark this as Helpful/Correct, if Applicable.

 

Regards,

Sourabh

 

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

are you saying when group is selected then it should show only members of that group in assigned to

if yes then use advanced ref qualifier on assigned to

https://community.servicenow.com/community?id=community_question&sys_id=65d147a9db98dbc01dcaf3231f96...

regards
Ankur

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