Comindware Knowledgebase

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.

Send you request to Comindware Still need help? Contact us

See Also

Back to top