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
Vаlidation Rules
Viewed 98 times since Thu, Apr 9, 2020

What should I do if a product serial number is lost?
Viewed 41 times since Wed, Dec 5, 2018

How To Delete a Task
Viewed 42 times since Wed, Dec 5, 2018

Optional Step 1: Add Company Logo
Viewed 45 times since Wed, Dec 5, 2018

Collecting debug information in Google Chrome
Viewed 42 times since Wed, Dec 5, 2018

Optional Step 2: Configure E-mail Notifications
Viewed 44 times since Wed, Dec 5, 2018

Assigning Responsible Persons
Viewed 77 times since Wed, Dec 5, 2018

Sales FAQ
Viewed 117 times since Wed, Dec 5, 2018

Introduction to User Guide
Viewed 40 times since Wed, May 20, 2020

Deleting a User
Viewed 44 times since Wed, Dec 5, 2018