- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2016 08:04 AM
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2016 08:27 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2016 08:37 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2016 08:34 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2016 08:40 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2016 08:47 AM
Thanks! It worked! I had the incorrect name.
Vince