Autopopulate Assignment Group based on category and Subcategory.

Gaurav Kumar15
Giga Guru

Hi All,

I have modified assignment look-up so that it will autopopulate the "Assignment Group" based on category and subcategory.

But when i select category and subcategory, then the Assignment group value comes on submission of the incident, but we want that to be dynamic.

Can't we make it dynamic? Does anyone faced the same issue?

TIA

Gaurav

4 REPLIES 4

sach1
Tera Guru

Hi Gaurav,



The Assignment Rules always work after submission.So this not a issue.



If you want it to appear dynamically on your Category Change,you ca follow the below steps:


1. Create a different table similar to Assignment Lookup table (remove Assignment from the OOB table)


2. Write a client script to get value from this table on Change of Category and Subcategory (You have to write 2 client scripts)


3. Write a GlideAjax function and call it in the above client script. Query your custom Assignment table in the GlideAjax.


Seems a little extreme to have to make a new table?



A brief onChange script for each field (Category and Subcategory) should call a function defined in your onLoad script. This function can call your glideAjax function and put the result in the Assignment field.


gyedwab
Mega Guru

If you use the Lookup Rules functionality, rather than the Assignment Rules functionality, there's a checkbox that allows you to say "Run on form change":



http://wiki.servicenow.com/index.php?title=Data_Lookup_and_Record_Matching_Support



http://wiki.servicenow.com/index.php?title=Defining_Assignment_Rules#Data_Lookup_Rules_2


As the @OP suggests, creating a table seems to be a bit extreme, especially given that the data already exists in Category & Subcategory, or the Support Group already assigned to a given CI.



So, how would one access the SupportGroup associated with a CI and set the AssignmentGroup to be equal to SupportGroup?