Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

is the value in it_team a sys_id?



if its the name, you need to change it to current.assignment_group.SetDisplayValue(current.variable_pool.it_team);


If its the workflow for the RITM. then you can use "current.assignment_group = current.variable_pool.it_team" and current.update(); in a run script activity.



//Göran


Hmmm, that worked for me when I tested.



I would check a few things


  • variable name (it_team)
  • Make sure the field is being populated (not so straight forward if it is hidden and being populated by another client script)
  • click on "Show Workflow" UI action on the RITM to make sure the activity is executing
  • variable reference table is set to sys_user_group (as opposed to cmdb_ci_group)


Outside of that, I'm not sure what it could be


Thanks! It worked! I had the incorrect name.



Vince