How can I pass values from RITM to Task in workflow

kevinwhittaker
Tera Contributor

I have an RITM form that I need to pass values on to the tasks that are created with in a workflow.   I need to pass the Business Unit field from the RITM to the Business Unit field on the created Task.   I've tried numerous different ways and none have worked...any help is appreciated.

I also have the same values on the Request (Business Unit) that I could use to pass to the created Task within a workflow.   I'm pretty new to this so I would again appreciate any help or advice.   Thank you!

1 ACCEPTED SOLUTION

Use this in the advanced script and see if it works



task.short_description = "Forward Desk Phone - " + " " + current.variables.u_ucmt_who.getDisplayValue() + " " + "-" + " " + current.variables.u_ucmt_date.getDisplayValue();


if (task.u_business_unit == '') {


  task.u_business_unit = current.u_ucm_bu;


}


if (task.u_location == '') {


  task.u_location = current.u_ucm_loc;


}


task.u_itp_reqfor = current.request.requested_for;


task.u_ucm_due_date = current.due_date;


View solution in original post

27 REPLIES 27

Something else is going on...the scripts are all the same...but every time I submit a new form the Business Units are populated on some but not others and it varies which tasks the Business Units are populating on????   I've added another image as an example:



RITM and Tasks2.png


Create a before business rule on sc_task table



when: before insert


Conditions: Business unit is not empty


Script:


  current.u_business_unit = current.request_item.u_ucm_bu;


sidkak
Tera Contributor

If the new task created is a sc_req_item can i also populate the fields of sc_req_item using the Create Task Activity?