I have an current workflow/form for when an employee terminates. On this form is a date field for their end date. I want to set an action in the workflow to either send an email or assign a task to the Supervisor to review a document and conduct checks 3-5 days before the prescribed end date. I am having trouble configuring the workflow to use the end date and calculate a date to send the reminder.
When I try follow other solutions the config's don't quite match up as we use only the new style of responsive forms/designer and previous solutions mention calculation actions I don't have available.
In you worklfow, you could use the "Add Time To Date" : Add Time to Date (nintex.com)
And passe a nagative number to get X date befor your end date
After make a "Pause until date"
And then send your Email or task.
But be warn that with this solution you will have some worklfow that will wait until the end date .... so if you have a large number of item this can this can cause problems (you can have a maximum of 100 instances of a workflow in the same time on a list)
I recommande you to make a site workflow that is scheduled every day. In The workflow you calculated a date (Today + 4days) retrieve all the elements that match your "ElementEndDate = CalculatedDate" and make a foreach on all the items retrived, then send a email or start a workflow on this items (this workflow will create a task)
When I try to do negative date values the workflow instance suspends and I get the following message.
RequestorId: e8ba78ea-7792-d681-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime. Parameter name: value at System.DateTime.AddTicks(Int64 value) at Microsoft.Activities.Expressions.AddToDate.Execute(CodeActivityContext context) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity