Set the due date of a task based on the parent workflow task/doc due date

You can set subtask parameters based on parameters of its parents. For example, you might need to set the due date of a subtask based on the parent task due date and the parent item priority.

To set the due date modify the previous example in the following way:

1. Substitute the functions of addition with the following one:

 SUBTRACT($parent->dueDate, DURATION(“P[n]Y[n]M[n]DT[n]H[n]M[n]S”))

2. Use the $parent->$parent->Priority condition to return data from the item level to the subtask level.

3. Specify the required duration values:

 

IF ($parent->$parent->Priority == ID(“Priority.values.Low”),

SUBSTRACT($parent->dueDate, DURATION(“P3D12H”)),

If ($parent->$parent->Priority == ID(“Priority.values.Medium”),

SUBTRACT($parent->dueDate, DURATION(“P1D12H”)),

SUBTRACT($parent->dueDate, DURATION(“P12H”))

)

)

The above expression sets the due date of a subtask depending on the priority of the parent item and the due date of the parent task. Type this expression as preset value for the due date of a subtask. You can also use the 'SUBTRACT($parent->dueDate, DURATION(“P[n]Y[n]M[n]DT[n]H[n]M[n]S”))' function separately to set the due date of any child element depending on the parent element’s due date. Note that workflow tasks don't have the system field Due Date, so you should pre-create it.

Attachments
There are no attachments for this article.
Feedback
Security Code
Related Articles
Support and Maintenance FAQ
Viewed 552 times since Wed, Dec 5, 2018

Creating Steps
Viewed 136 times since Wed, Dec 5, 2018

Moving a Task to Another Application
Viewed 131 times since Wed, Dec 5, 2018

Registering an Account at Comindware Web Site
Viewed 276 times since Wed, Dec 5, 2018

Getting your team to start using Comindware Tracker
Viewed 180 times since Wed, Dec 5, 2018

Capturing comments from triggers
Viewed 1 times since Fri, Mar 5, 2021

Mandatory Fields
Viewed 226 times since Wed, Dec 5, 2018

Summary
Viewed 134 times since Wed, Dec 5, 2018

About Single Sign-On
Viewed 231 times since Wed, Dec 5, 2018

Default User Groups
Viewed 134 times since Wed, Dec 5, 2018