When someone creates a Task, I give them an option of creating asequence of Tasks that are commonly performed.
They fill out one Task and I script the creation of the other Tasks throug judicious use of the SetField script step.
One that is givng me troubles is the dueDate (date).
I am passing the field dueDate to the variable $duedate.
Then, I create a record and SetField dueDate with calculation $duedate +7. But this does not set the new Task for 7 days after the first Task.
This may be due to variable being data type "text" rather than "date".
I have tried Defining the variable as $duedate = dueDate +7 and then calling $duedate as GetAsDate ($duedate) but it doesn't work.
I have also tried $duedate = dueDate and calling it as a calculation in the SetField as $duedate +7.
Can I pass dates to a variable? if so, how do I get a date back out?
How can I increment the first date by 7 using a means similar to this for the result I am looking for?
I guess I could define 3 more fields in the db, such as dueDate+7 (calculation) = dueDate +7.
But that's creating more data and permanent data storage. There MUST be a better way.
Thanks in advance for any help any can offer. Much appreciated.