none
[Forum FAQ] SharePoint Workflow Weekly Reminder RRS feed

  • General discussion


  • Some users have such a requirement to end a mail reminder weekly to the assignee until the due date after a task is created, we can use two workflows and Retention Policy without code to achieve this in SharePoint 2010 and SharePoint 2013.

    This approach is implemented by three parts:

    • First workflow is responsible for sending a reminder mail to the user in “Assigned To” column and setting the next remind date.
    • Retention Policy is responsible for triggering above workflow on a specified remind date.
    • Second workflow is responsible for setting an initial remind date as “Start Date” of the current task item.

    As an example of Task list as below, you can change the list/column name as you want.

    Task Name:  Tasks with Reminder

    Column Name: Remind Date (Date and Time type)

    Column Name: Start Date Backup (Date and Time type, default value 1/1/2000 12:00AM)

    The “Remind Date” and “Start Date Backup” columns (and/or two workflow columns) can be hidden from the list form page (e.g. NewForm.aspx/EditForm.aspx/DispForm.aspx) and list view.

    For the first workflow, it is used to send a reminder mail to the user in “Assigned to” column, and set the next remind date.

    1. Create a workflow named “Send Reminder Mail” and attached it on the custom list “Tasks with Reminder” created previously, we uncheck all start options due to that this workflow is only  started by the Retention Policy on the Task content type in this custom list “Tasks with Reminder”.

    Note: This workflow is triggered by Retention policy on the “Remind Date”.

    2. Then we can create the sending mail logic in workflow 3 steps.

    • Step1: Stop the workflow without sending reminder mail if the task is completed, even if the current date (i.e. Remind date in this case) is still less than the due date.
    • Step2: Send reminder mail to the user in “Assigned To” column
    • Step3: Set next remind date, or set next remind date as an early date if the next remind date is greater than due date.

    There is a workflow variable “NextRemindDateVar”, which is equal to the current “Remind Date” adding 7 days, in the workflow condition,

    -          If “NextRemindDateVar” is greater than “Due date” we will set the Next “Remind Date” as an old date (i.e. 1/1/2000 12:00:00AM as below), then the Retention Policy could not trigger the workflow based on this date in the future;

    -          If “NextRemindDateVar” is not greater than “Due date” we will set the “Remind Date” as “NextRemindDateVar” variable value, then the retention policy will trigger the workflow on next “Remind Date” column.

    Note: For the “Variable:Date2000” in the above image, it is used to set the “Remind Date” with an old value to terminate the reminder sending if the next remind date is greater than due date.

    For the second workflow, it is used to set an initial remind date as task “Start Date” value.

    1. We create the second workflow named as “Set Initial Remind Date”, which needs to be stared when the item is created or changed, please enable tow options as below image.

    2. The workflow will set the “Remind Date” column initial value as “Start Date”, then send the first mail on Remind Date/Start Date, if the “Start Date” is changed this workflow will also change the Remind date initial value as changed “Start Date”.

    • The first two steps are used to avoid from setting the initial “Remind date” and stop the workflow, if there is no value in column Start Date or Due Date or Assigned To.
    • The third step is used to re-set the “Start Date Backup” and “Remind Date” value as “Start Date” when the Task item is created or changed.

     

    For the Retention Policy, it is used to trigger the workflow “Send Reminder Mail” on the specified Remind Date.

    1. We create a retention policy on the Tasks content type in custom list “Tasks with Reminder”.

    2. Then configure it as start the workflow “send Reminder Mail” on the “Remind Date”+0 days, it will trigger the workflow on “Remind Date”.

    Note: We need to re-select the workflow newest version in Retention Policy after the newer SharePoint workflow version is published.

    3. The timer job “Information management policy” and timer job ”Expiration policy” are responsible for Retention Policy, their schedule type both are “Weekly” by default, we need to set them both as “Daily”, this will make timer job daily check if some tasks need to trigger the workflow “Send Reminder Mail” on “Remind Date” today.

    The Results

    The date of “Today” is 1/14/2012.

    • Task1 next remind date is greater is than Due Date, set as 1/1/2000 by workflow “Send Reminder Mail”.
    • Task2 is set the Remind Date as 1/21/2014 by workflow “Send Reminder Mail”.
    • Task3 “Start Date” is 1/16/2014, the “Send Reminder Mail” will start on Remind Date of 1/16/2014.
    • Task4 “Assigned To” is blank, the Remind Date is blank by workflow “Set Initial Remind Date”.
    • Task5 “Due Date” is blank, the Remind Date is blank by workflow “Set Initial Remind Date”.
    • Task6 “Start Date” and “Due Date” is blank, the Remind Date is blank by workflow “Set Initial Remind Date”.
    • Task7 “Start Date” is blank, the Remind Date is blank by workflow “Set Initial Remind Date”.

    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thursday, January 16, 2014 9:54 AM