1. Wait until specified date (Sharepoint column) is reached.
2. Send out mail.
But now I want to change the date of the reminder-column and i need to automatically terminate the old workflow instance which is still waiting for the old date.
1. You have a workflow - "ReminderWF" which read a Date from a SP column, pause and send an Email Reminder.
2. Not stated is how the workflow is trigger - most probably "Start when items are created"
3. Your UPDATE process flow- Edit the Date column. You only want to terminate the running Workflow instance on this item. And re-run "ReminderWF" with the updated Date.
4. "ByeBye_ReminderWF" - This is the workflow to terminate the running instance of "ReminderWF" and re-run it again using the Start Workflow action.
5. The trigger for "ByeBye_ReminderWF" can be "Manual" or "Start when items are modified" (You will need to Add Conditions)
The ByeBye_ReminderWF
1. Use a "Terminate Workflow Instances" action
2. Configure as follows
3. To re-run "ReminderWF", use a "Start Workflow" action
Hope that helps
I see you have a workable solution - great!
We run into the same issue, and have adopted a better long term strategy: use Site Workflows, rather than a list Workflow.
A site workflow can be scheduled to run at say 2AM, query any list items where reminder date = current date (Query List Action to build a collection variable), and return the IDs of the items into a collection variable. From there, you can loop through each item (for Each action) and grab the ID and other fields needed for the email as regular variables and send the notification.
We normally write back to a text field called ReminderSent in the for each loop and have the workflow enter the date. This field can then be used as a filter in the gathering process to exclude any where the ReminderDate is not null. Or clear it out if updating to a later date and need the reminder resent.
Dates change, and this adds more flexibility down the road, and one workflow can handle multiple reminders across multiple lists (run the actions in parallel).
One final note: in the body of the email, we normally include a message in smaller type along the lines of "This email notification sent via Nintex Site workflow 'First Reminders' ". Once you have a lot of emails going out, you need a way to know which one spawned what! We do the same for List workflows as well.
In this scenario, create the new site workflow, and go into workflow settings and delete the old one.
Hi @bgarvey - Thanks for sharing your solution and I agree that its a much better long term solution.
I especially like 2 small but mighty ideas - the ReminderSend column (store the date reminder sent out) and the including a message source of "This email notification sent via Nintex Site workflow 'First Reminders' "
@ALX - Thanks for sharing your problem. I learned to explore the "Terminate Workflow Instances" which I haven't used before.
You are most welcome. In most cases, we have a list workflow set to fire conditionally on change where the reminder date changes, the new value is in the future, and the ReminderSent is populated. It simply goes in and removes the text. Conditions on workflow starting is great, but can also slow down the user save time for an item, as all workflows with conditions are evaluated as part of the save. So use sparingly!!
Sorry for side-tracking
Since all the values are saved on SPO, I prefer to use PowerShell PnP which is faster.
1. Query List using a CAML where Date equals TODAY. Return the results to Array variable
2. ForEach loop using the Array variable - the Processing Part (send Email)
Again, Sorry for side-tracking
I like this - unfortunately in my tenant, use of PowerShell is only for the folks on the corporate IT team, not us business users. Jealous!
I know when they do it via the scripting, it is way faster.