Forum Discussion

AndreaJohannes's avatar
AndreaJohannes
Qrew Trainee
3 years ago

Need to create a date based reminder

Hello,

I have a start date field in my Position table.  I need to create a reminder that sends an email to the email address in the Supervisor Email Address field 30 days before the start date in the current year to remind them to complete and submit an annual evaluation.  I can't figure out how to write a formula to calculate the number of days from the start date, but in the current year. Also, I'm finding that the reminders won't allow me to pull in the Supervisor Email Address -- while a notification will only fire if the position is added or modified, which wouldn't be the case in this situation.  Suggestions on how I might accomplish this? Do I need to parse the date into separate fields like month and day and then try to create the same month and day but with the current year? If so, how do I do that?
Thanks in advance for any help/advice!

------------------------------
Andrea Johannes
------------------------------

5 Replies

  • PaulPeterson1's avatar
    PaulPeterson1
    Qrew Assistant Captain
    You could try something like this:

    var number serviceYears = If(Year(Today()) > Year([Start Date]), Year(Today()) - Year([Start Date]), 0);

    If($serviceYears > 0, AdjustYear([Start Date], $serviceYears) - Days(30), null)

    ------------------------------
    Paul Peterson
    ------------------------------
    • AndreaJohannes's avatar
      AndreaJohannes
      Qrew Trainee
      Hi Paul, 

      Thanks for responding!  Would that be a separate field that I am creating and that is what I would use? or is that something I would embed in either the notification or reminder?


      ------------------------------
      Andrea Johannes
      ------------------------------
      • PaulPeterson1's avatar
        PaulPeterson1
        Qrew Assistant Captain
        Yes, it would need to be a new field. And looking at the Reminder setup options, you could omit the "- Days(30)".  Suppose you name the new field Anniversary Date, when you create the reminder set it to Remind When 30 days Before the date in the field Anniversary Date.

        ------------------------------
        Paul Peterson
        ------------------------------