In this post we will discuss how we can change the due date for a task list in SharePoint designer workflow. Also you can check out my previous posts on:
In SharePoint 2010 designer workflow by default due date comes as today's date. But we need due date to be today's date + 7 days. So below is the way you can change the due date.
Before reading this, check out this article
on Reusable Approval workflow in SharePoint designer 2010.
Open the SharePoint site using designer and then click on the workflows link from site objects and then select your workflow.
Then click on the Approval link as shown in the figure below:
Then from the Customization section, click on "Change the behavior of a single task" as shown in the fig below:
Go to the first part "Before a Task is Assigned" and there add one action. From Core Actions select "Add time to Date". It should now look like below fig.
Now click on the minutes link and change that to days and then click on 0 link and add 7. Then click on the date link and then click on ... button and then select Today.
The above step will add 7 days to current date and assign it to date variable. Now it should look like below:
Then add another action to set the due date field of the Task. From Actions, From Task Behaviour Actions section select Set Task Field.
In this Action click on the field link and select Due Date and then click on value. And click on fx. This will open the Lookup for Date and Time dialog box. There select Data source as Workflow Variables and Parameters. And Field from source as Variable:date. Remember in the first action we added 7 days to this variable. So it should look like below:
Then click on Ok. So our action should look like below:
Now save and publish the workflow, the due date will come as today date + 7 days format. Similarly you can also change other fields like Title etc.