Set assignment group based on field value

vcaracci75
Tera Expert

I have a service Request that I would like to have auto-assigned based on a value from one of the variables. The variable is a reference field called "it_team" and it references the sys_user_group table. can I do this via the workflow, or do I have to use a catalog client script? IF so, how would I do that?

Thanks!

1 ACCEPTED SOLUTION

Oh, okay.   No worries, we all start somewhere



That would be even easier.   In the Run Script activity, add:



current.assignment_group = current.variable_pool.it_team;


current.update();



To my knowledge, you can only use table fields, not catalog variables in the 'Set Values' activity.


View solution in original post

13 REPLIES 13

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

It can be done through many ways 😃 I would put it in the workflow since you always should try to avoid client scripts if you can. Can you do a screen shot of your workflow so it's easier to recommend how/when=



//Göran


Hi Goran,



Thanks for the quick response! I have attached the workflow below. Ideally, I would want this to happen in the circled area. Thoughts?



Workflow Capture.JPG


dannypatino
Kilo Expert

Do this in the workflow:



  1. For the catalog task, check Advanced
  2. In the Advanced Script field, add the script task.assignment_group = current.variable_pool.it_team;


Example:



find_real_file.png


Hi Danny,



In this particular request, there is no task. Can I do this using X= Set Values?



Thanks,