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.

 

0 individual title

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.

4 single task behavior

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.

3 before a single task is assigned

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

3 set task ttiel

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.

4 due date variable def

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.

4 add time to date

4 add time to date placeholder

4 add to today

 

4 complete

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.

 

 

About

MCSE, PMP, With more than 12 years experience in Microsoft technologies.

View all posts by

4 thoughts on “How to set a due date for a single task in custom task process in SharePoint designer workflow

  1. Hi,

    In SPDesigner, I try desesperately to find a way to approve an overdue task. I would like to approve a task automatically when its due date is expired and continue the process (next task/next user…)

    How can I do this ? Is it possible ? I end up doubting. I made several tests, in vain ☹

    I set a worklow on my tasks list, I open the behavior of the task (expire section), retention policy, but I don’t find the good solution to update the outcome value as “Approved” like if I clicked on the button “Approve” in the task screen.

    Your help and experience would help me greatly.

    Hoping regards,

    EM.

    1. Hi,
      It is possible to “Rescind” a task when a task is expired. to do that, in the custom task process, in the single task behavior, in the when a task is expired you have to add it. “This action is displayed in workflow steps as then Rescind this task. It completes the task without an outcome.”
      You may be able to set the outcome of the task before the “Rescind” I did not try it yet, but give it a shot!
      Set a task field: “This action is initially displayed in workflow steps as Set Task field to value. Use this action to set a field in the current task item to a value. It can be used on a task that has not been created yet.”

      1. Hi, I don’t want to rescind it 🙂
        I just want to go to the next step of the approval, you know what I mean ?
        in parallel to that I try to change the due date. I entered the number 5 in the field “duration per task” based on the date of today or the date of creation but it does not work either.
        Do you know why ?
        Best regards,
        EM

        1. If you want to go to the next level of your workflow, you have to complete the current task. it means you should have some sort of viable output for the task and also make it as a completed one. the default outputs are Approved / Rejected. the other option is to rescind the task. Also it is possible to assign a task to a new user if the task is expired,…
          It is not possible to go to the next level of your workflow while you did nothing for the current level.
          for your due date problem, what do you mean by it does not work. do you mean the field is not set in your task item?
          If you want to do something to the task after it is past due date, you have to explicitly set it in your workflow!

Leave a Reply