I have tried the code from the PM2 post (below) but have met with no success. I'm not really a programmer - i just feed off the scraps of other peoples' cleverness.
What I am trying to accomplish is have a user set a date (@@completionDate) at the beginning of a process and have that reflected as the Due Date for the next task. I don't want to use the Timing Controls as I want to have the process initiator set the value once and then be able to apply this to later tasks in the process.
I have set the following trigger to fire after routing:
$caseId = @@APPLICATION; //lookup the user assigned to the next task in the case $query = "SELECT MAX(DEL_INDEX) AS NEXT_INDEX FROM APP_DELEGATION WHERE APP_UID='$caseId' "; $result = executeQuery($query); $nextIndex = $result['NEXT_INDEX']; $duedate = date('DD-MM-YYYY', strtotime(@@completionDate) ) . ' 18:00:00'; $result = executeQuery("UPDATE app_delegation SET DEL_TASK_DUE_DATE='$duedate' WHERE APP_UID='$caseId' AND DEL_INDEX='$nextIndex' ");
Thanks for your patience