How to set assignment group for record producer?

astanley
Tera Contributor

How can I set the assignment group for a record producer? For example if the selected region is XY, I would like to assign to group A. If the selected region is anything else, I would like to assign to group B. I am a servicenow admin and I am not familiar with coding or creating scripts

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use record producer script

I assume region is some variable on your record producer form

if(producer.regionVariable == 'XY')
	current.assignment_group = 'groupASysId';
else
	current.assignment_group = 'groupBSysId';

Regards
Ankur

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

View solution in original post

2 REPLIES 2

Murthy Ch
Giga Sage

@adrienne 

Do you want to set the assignment group value in form level or record level.

If it is in form level you can use onChange client and set the value accordingly.

If it is in record level you can use script section and set the assignment group.

 

Thanks

 

Thanks,
Murthy

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use record producer script

I assume region is some variable on your record producer form

if(producer.regionVariable == 'XY')
	current.assignment_group = 'groupASysId';
else
	current.assignment_group = 'groupBSysId';

Regards
Ankur

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