The CreatorCon Call for Content is officially open! Get started here.

How to populate RITM variables value in Catalog task variables

RudhraKAM
Tera Guru

Hello there , 

We have a catalog item with 2 Variables Variable1 will be displayed on the form and Variable 2 is hidden but available on catalog task  when the request is raised the variable1 value  entered by the user should be populate in the  variable 2 on catalog task , 

I tried Below scenarios : used the On submit client script (its populating the values on catalog task but when ever i save the task all the values are clearing /deleting ) 

is there a way i can copy values form Variable A to Variable B on catalog Task ?

I also tried on catalog task advance script 

task.variable1= current.variable2 

and 

task.current.variable1= current.variable2 

1 ACCEPTED SOLUTION

kam,

Since you're using a Client script, your values aren't saved to the DB when the page reloads. So, when you add notes to the record, the previous values from the Client script disappear. You'll need to run a Server-side script if you want the values to persist.

View solution in original post

17 REPLIES 17

James Gragston
Tera Guru

Kam,

So, you're trying to get the variable values from the RITM onto the Catalog Task?

Yes james

Kam,

On the Catalog Task activity on your workflow, use the 'current' object to access the RITM:

task.my_task_variable = current.variables.my_variable;

The above line would assign the variable value (user input) to a field on the task record.

Place this code in the script field on the task activity.

Of course, this is assuming that your main workflow is running on the [sc_req_item] table.