Pergunta

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.

Foi útil?

Solução

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.

Outras dicas

You can use calculation field

=[Created]+2

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top