How to set a due date for a single task in custom task process in SharePoint designer workflow
When you place a new Custom Task Process action in Microsoft SharePoint designer workflow, it gives you a configuration page to set the Title, CC, description, Due Date and some other related fields of tasks.
Figure 1 – custom task process assignment page
You have to select a number of days (for example 3) for all of your tasks to set due date and it is not possible to individually change the due date of a single task. But in real world examples, it is likely that each stage of the workflow needs its own due date and it is kind of hard to set a general due date for all tasks in a custom task process. In this post I want to introduce a technique for you to set the due date of tasks individually in custom task process of SharePoint designer workflow.
In a series of posts, I am describing the different features of Custom Task Process in Microsoft SharePoint designer. You can see a list of link to all posts here.
It is better you first create the simple working example of Custom Task Process in SharePoint designer and then you can check other posts that you are interested in.
First of all, you have to track in which stage your workflow is. To track the stage of your Custom Task Process workflow in SharePoint designer, I introduce a technique in this post. Please read that post first in order to get yourself familiar with the technique. The basic idea is to create a local workflow variable in SharePoint workflow designer and change the value of the local variable after each stage.
We use Microsoft SharePoint designer 2013 and SharePoint online to develop the workflow of this post. Also we use the SharePoint 2010 workflow engine in order to develop custom task process workflow.
So, we have a varStage variable to store the stage of the workflow. We can use this local variable in order to set the custom due date for individual tasks in your custom task process.
First you have to go to the custom task process customization page and click on the change the behavior of the single task.
Figure 2 – click on the change the behavior of a single task in custom task process customization page
Then point to the “Before a Task in Assigned” section.
Figure 3 – Before a Task in Assigned section
Then you have to write some criteria to filter the specific stage you want to set the due date
Figure 4 – stage criteria check
Then you have to create a local variable and set the value of that local variable to reflect your due date needs.
Figure 5 – create a local variable to store the date
Then you can set the due date of your task to the calculated workflow local variable.
Figure 6 – set task due date
So by this technique, you can individually set the due date of your tasks in custom task process of SharePoint designer workflow.