Populate SCTask Field from Variable Set Value

WP2
Kilo Guru

Hello,

Need help setting a date/time variable (needed_by) value which is part of a variable set to auto populate SCTask "Due Date" field (due_date). I know I can achieve this from a workflow however, this variable is always going to be used as part of a variable set. I will need the variable value to auto populate the SCTask field every time based on the selection in the variable. If you can help with the script, that will go a long way.

 

Thank you.

 

1 ACCEPTED SOLUTION

If this variable is not included on this Catalog Task, use

current.due_date = current.request_item.variables.needed_by;

Of course the variable would also need to be populated on the RITM before the Catalog Task is created. 

View solution in original post

5 REPLIES 5

Brad Bowman
Kilo Patron
Kilo Patron

In a workflow, on the activity that creates the Catalog Task

task.due_date = current.variables.needed_by;

or a before Insert Business Rule on the sc_task table:

current.due_date = current.variables.needed_by;

Thanks Brad for your help.

The BR worked for RITM table but it didn't work for SCTask table. I changed the order but same thing. Any idea what may be wrong?

 

If this variable is not included on this Catalog Task, use

current.due_date = current.request_item.variables.needed_by;

Of course the variable would also need to be populated on the RITM before the Catalog Task is created. 

Once again, thank you. That fixed the issue.