How to populate Assignment group dynamically based on category?

Aki17
Kilo Guru

What I would like to do is to make the table populate values dynamically as below:

1) When [category] = A, B, or C --> [Assignment group] = X (filled automatically)

2) When [category] = D, E, or F --> [Assignment group] = Y (filled automatically)


I believe that I will need to put client script, but could someone please give me the sample script for this requirement?


Best Regards,

1 ACCEPTED SOLUTION

Raf1
Tera Guru

Hi Aki,

You can consider using Assignment rules, more info on the link below:

 

https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/task-table/concep...

 

Thanks,

Raf

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

either use assignment rule of use before insert business rule on that table

sample script below; use proper category field name, choice values for A, B, C, D, E, F etc and proper sys_id of the Groups X and Y

if(current.category == 'A' || current.category == 'B' || current.category == 'C')

current.assignment_group = 'sysIdOfXGroup';

else if(current.category == 'D' || current.category == 'E' || current.category == 'F')

current.assignment_group = 'sysIdOfYGroup';

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

AbhishekGardade
Giga Sage

hello Aki,

Assignment lookup rules :

The instance can automatically assign a task to a user or group based on pre-defined conditions by using data lookup rules and assignment rules.

https://docs.servicenow.com/bundle/helsinki-customer-service-management/page/product/customer-servic...

Hope you have gone through this:

https://www.servicenowguru.com/system-definition/assignment-rule-lookup/

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

Thank you,
Abhishek Gardade