- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2022 11:49 AM
We are trying to set the SCTask Assignment Group Routing based on a Request Form Variable. The variable is a Reference type that is pulling data from our sys_user_group table. What is the best way to script this on the workflow Catalog Task node? I've attempted a couple of options and, because I'm not strong in scripting, couldn't get it to work.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2022 02:38 PM
Hello Josh,
Please refer to this thread that will help you for sure:
Using RITM variables in workflow
You can access RITM variables in workflow in the following way:
current.variables.variable_name
being "variable_name" the name of the variable that has the reference to the sys_user_group.
Hope this helps you!
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Best Regards,
Filipe Cruz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2022 02:38 PM
Hello Josh,
Please refer to this thread that will help you for sure:
Using RITM variables in workflow
You can access RITM variables in workflow in the following way:
current.variables.variable_name
being "variable_name" the name of the variable that has the reference to the sys_user_group.
Hope this helps you!
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Best Regards,
Filipe Cruz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2022 05:16 AM
Hi Filipe!
Thank you for the information! It was helpful and, what worked for our situation was:
var grp = new GlideRecord('sys_user_group');
grp.addQuery('assignment group',current.variables.please_select_the_appropriate_application_team_for_their_review);
grp.query();
if (grp.next())
{
task.assignment_group = current.variables.please_select_the_appropriate_application_team_for_their_review;
}
Adding this script to our Catalog Task Workflow Node allows us to set the Assignment Group on the SCTask form based on the Reference Variable. The Reference pulls from the sys_user_group table.
Thanks again!!
-Josh