Not being able to access Record producer variable in workflow

Debapriya
Kilo Contributor

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!

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

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.

View solution in original post

3 REPLIES 3

SanjivMeher
Kilo Patron
Kilo Patron

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.

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.

Debapriya
Kilo Contributor

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