Saturday 18 October 2014

Creating a Reminder Workflow on a standard Task List in SharePoint 2013 / SharePoint Online

SharePoint Task lists are one of the great strengths of SharePoint Team Sites. Having a central list to keep track of and assign tasks to people is great for productivity.
But what about when people ignore the list their tasks within it?
In this blog I am going to create a fairly simple SharePoint Designer List Workflow that each day will check whether a task is Overdue AND not Complete, and send a reminder email to the person who is in the Assigned To field.
This will work for a standard Task list. I have created it in Office365 environment, but this will also work on your On-Prem SharePoint 2013 install.
So here goes…

Step 1: Create the list Workflow in SharePoint Designer

  

Step 2: Set up the Stages.

In this workflow, we require two stages: Running, and Finished.

So go ahead and create them using the "Stage" dropdown:

Step 3: Set the conditions

This example uses lots of conditions to check whether it should send the email so you’ll need to insert a 4 conditions within the Running stage.
1. If any value equals value
2. If any value equals value
3. Person is a Valid SharePoint User
4. If any value equals value




So your blank conditions will look like this:

Condition 1: Current Item:Due Date is less than Current date

Condition 2: Current Item:Due Date is greater than 01/01/2000 (this accounts for instances where Due Date is left blank)


Condition 3: Current Item: Assigned to is a valid SharePoint user

Condition 4: Current Item: Task Status not equals Completed


So all of the Conditions together should look like this:

Step 4: Set the Actions

So, what actions to perform if the above evaluates to True?
1. Find Interval Between dates
2. Find Substring in String
3. Extract Substring from start of string
4. Send an email
5. Log to History list



Once you have added these blank actions to your workflow, it will look like this:

Action 1: Find days between Current Item:Due Date and Today (output to Variable:DaysOverdue)

Action 2: Find <space> in Current Item:Assigned To (Output to Variable:fnameLength)
This action will get the number of letters in the first name. Assumes that the Assigned To Display name looks like "John Citizen".

Action 3: Copy Variable:fnameLength (the number of characters in the first name) from the Current Item: Assigned To (Output to Variable:DisplayFirstName).
Output to the DisplayFirstName variable should be "John".

Action 4: Send the email (details below)
Action 5: Log "Sent email reminder" to the workflow history list.

So the finished product of Actions will look like this:

Create the Email





Step 5: The Finished Product:

Stage: Running  If Current Item:Due Date is less than Today and Current Item:Due Date is greater than 01/01/2000 AM  and Current Item:Assigned To is a valid SharePoint user  and Current Item: Task Status not equals Completed  Find days between Current Item:Due Date and (Output to Variable: DaysOverdue )  then Find in Current Item:Assigned To (Output to Variable: fnameLength )  then Copy Variable: fnameLength characters from start of Current Item:Assigned To (Output to Variable: DisplayFirstName )  then Email Current Item:Assigned To  then Log Sent email reminder to: Current Item:Assigned To to the workflow history list  then Pause for I days, 0 hours, 0 minutes  Transition to stage  If Current Item: Task Status equals Completed  Go to Finished  Else Go to Running  Stage: Finished  Log Reminder Task completed by Current Item:Modified By to the workflow history list  Transition to stage  Go to End of Workflow

Step 7: Final Configurations