3

We are creating tasks in a workflow but we cannot find a way of setting the due date in the same workflow. We resorted to adding a workflow to the task list that adds the due date on item creation.

Is there better way of doing this? We need the due date to be 2 days from the time of task creation.

Just to be clear, my problem isn't using calculated fields to set the Due Date (I have a workflow on the Task List to do this). I want to be able to set the Due Date in the same workflow that creates the task.

  • I saw in your answer above about updating item to set the due date in the task - what is the lookup you use? – user57326 Jul 21 '16 at 19:50
  • If I need to enter a condition that notify the user when an Item has been created after 3PM. It's possible? – Eder Pina Jun 16 '17 at 17:14
8

Go to your Tasks List and go into the List Settings. Click on the Due Date column and tick the Calculated radio button. In the formula, put [Today]+2 and click OK. Go back to the list and select New and you'll see the Due Date is 2 days in the future.

If you need to do this within the workflow, you'd use an Add Time to Date action, setting it up to add 2 days to the Current Item created by field. Then, you'd use an Update item action to update the Due Date field to the date variable the Add Time to Date action output.

  • I'm not sure I understand. I don't want all tasks to have this due date, just the ones created by this specific workflow. – ilitirit Feb 15 '12 at 14:26
  • edited answer to include steps to do it in SPD. – Eric Alexander Feb 15 '12 at 14:38
3

You can use calculation field

=[Created]+2
0

Setting the default value for the "Due Date" column in the Workflow tasks list wont matter as the item is getting created inside the workflow.

So, below is what worked for me:
  1. Create a new local variable called "TaskDueDay2" of date datatype & TaskID of type string

image

  1. Calculate the new Due Date using below [action name is Add Time to Date]. Here I am appending 2 days to CurrentItem:Modified

enter image description here

  1. The use the "Assign a task" action where you would capture the output to Variable TaskID

enter image description here

enter image description here

  1. Ensure that you edit the email sent when task is created where you should say use value of "TaskDueDay2" instead of regular "Due Date"

enter image description here

  1. Now use "Update Item" action and assign the "Due Date" field value to local variable called "TaskDueDay2" which is calculated above.

enter image description here

  1. Now the workflow is complete.

Below I am putting the complete Workflow image for you.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.