- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2018 04:29 AM
I have a record producer written on catalog task table, in which I have a variable Operating Unit, which is a drop down variable having four values : say a, b, c, d.
On selecting c in Operating unit on the form and submitting the form, the request should get assigned to a particular group. On selecting any of the rest options in Operating unit , the request should get assigned to another group.
A workflow is attached to this record producer through script:
current.u_hidden_workflow_check = gs.getProperty('name_of_property_having_workflow_name');
I tried implementing the above in workflow using current.variables.operating_unit , but this doesnt seem to work.
I tried using the below code:
if(current.variables.operating_unit == 'c')
{
set Assignment group}
else
{set other assignment group
}
The record producer variable operating_unit doesnt seem to be accessible in workflow. Could somebody please help me out on this.
Thank you in advance!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2018 10:28 AM
I think, you should write this script in the record producer script as below
if (producer.operating_unit=='c')
{
current.assignment_group.setDisplayValue('ABC');
}
else
{
current.assignment_group.setDisplayValue('EFG');
}
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2018 10:28 AM
I think, you should write this script in the record producer script as below
if (producer.operating_unit=='c')
{
current.assignment_group.setDisplayValue('ABC');
}
else
{
current.assignment_group.setDisplayValue('EFG');
}
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2018 07:58 PM
Please mark the response correct if it worked for you
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2018 03:39 AM
I could not access the variables in workflow, I have instead created two different workflow, checked my condition on the script part of Record producer and called the corresponding workflow depending on the condition.
Your script helped me in achieving this.
Thanks and Regards,
Debapriya