The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set Value form variable in the request form to Table field

naveenahr
Kilo Contributor

Hi All,

How to set the value to table feild from the variables in the request item.

Ex: Leaving date is the variable in the request item.

Have to fetch this value to due date in the RITM table.

Please help.

end_date= leaving date

u_leaving_date= Due Date field value

var gr= current.variable_pool.end_date.getDisplayValue();

gs.addInfoMessage(gr);

current.u_leaving_date= current.getValue(gr);

gs.addInfoMessage(u_leaving_date);

Thanks,

Naveena

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

It should be a Before Insert/Update Business rule with script



current.u_leaving_date = current.variables.your_variable_name;



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

15 REPLIES 15

SanjivMeher
Kilo Patron
Kilo Patron

It should be a Before Insert/Update Business rule with script



current.u_leaving_date = current.variables.your_variable_name;



Please mark this response as correct or helpful if it assisted you with your question.

Thanks Sanjiv,



If i want to update the u_leaving date for different variables in different request item?



EX: I will write the above business rule with one variable.



I want update the u_leaving_date for diff request item where it should update on completion date variable(or on diff varible)



How to acheive.



Thanks,


Naveena


You can write based on condition. For ex



if (current.cat_item.name == 'Employee New Hire')


{


        current.u_leaving_date = current.variables.your_variable_name;


}


else if (current.cat_item.name == 'External Visitor Pass')


{


        current.u_leaving_date = current.variables.your_variable_name2;


}



Please mark this response as correct or helpful if it assisted you with your question.

Hi Sanjiv,

I need to mass update existing task variable fields like "location' to request location. not  through workflow as we already generated tasks.

while I use one time schedule script with req.location = task.variables.task_location; it returns null from logs for location.

this seems working for string field like short description.

Do you know way to achieve this mass update for reference fields.