arobins
Novice

Send an email based on a column date

Jump to solution

Hi

I'm sure this is easy but I'm new to Nintex and I can't get this to work.

I have a list of employee names and their employment start dates. I want an email sent to me when the current days month and day are equal to any employees start date month and day. For example my employment start date is 3/17/2000, each day the workflow will run and compare todays month and day (3/17) to the employees. If they equal the email will be sent.

Any help would be appreciated.

Thanks

Andrew

Reply
4 Replies
mapeacock
Apprentice

Re: Send an email based on a column date

Jump to solution

Hi Andrew,

You would need to iterate through the employee records and load into a collection to run the logic on. Preferably if you could use a Query List action to grab the ID's of the relevant records, you can loop through and trigger the emails.

OR

You could create 2 string variables and use the below format to populate them:

fn-FormatDate(Current Date,MMdd)

fn-FormatDate(StartDate,MMdd)

Then add a RunIf or "Set A Condition" action to compare the two values and only trigger when they are equal. I assume you would have this as a scheduled workflow?

Cheers,

Mark

Reply
prasannaadavi
Apprentice

Re: Send an email based on a column date

Jump to solution

Andrew,

The simplest way to do this would be to Use a site workflow and schedule it to run once a day.

The workflow would look something like this:

1) Create two additional columns in the SharePoint List, which will give you month and day from the start date ( you could also do it in the workflow, but I found it easier to do it sharepoint. For month use a calculated column = =TEXT([Start Date],"mm"), and for day, use =TEXT([Start Date],"dd")

2) Query the list to get all IDs.

3) Now for each ID, query the list to get the Employee Name, Start date, the month and day you calculated above in step 1

4) Now all you need to do is compare the month and date, using the formatdate inline function in the workflow, and send an email if they match.

And finally schedule this Site Workflow to run once a day.

Hope this helps!

Reply
prasannaadavi
Apprentice

Re: Send an email based on a column date

Jump to solution

Mark Peacock​ Sorry mark, I did not see your reply before I posted mine. Did not mean to repeat what you already described!

Reply
arobins
Novice

Re: Send an email based on a column date

Jump to solution

Thanks for the detail Prasanna. This worked for me.

Andrew

0 Kudos
Reply