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
Exporting to Microsoft Word
Viewed 94 times since Wed, Dec 5, 2018

Creating Parallel Tasks In a Workflow
Viewed 120 times since Wed, Dec 5, 2018

Tasks And Documents
Viewed 95 times since Wed, Dec 5, 2018

Header
Viewed 85 times since Wed, Dec 5, 2018

Step 2: Pre-Designed Business Application Or Custom Business Application
Viewed 75 times since Wed, Dec 5, 2018

What is Comindware Expression Language
Viewed 155 times since Wed, Dec 5, 2018

How to Configure Integration with SharePoint Server
Viewed 77 times since Wed, Dec 5, 2018

Creating a List
Viewed 78 times since Wed, Dec 5, 2018

Workflow Elements
Viewed 101 times since Wed, Dec 5, 2018

Creating an Automated Scheduled Report
Viewed 89 times since Wed, Dec 5, 2018