1 Reply Latest reply on Jun 8, 2011 8:16 AM by mgores

    Change record on sending email

    MartijnvR

      Title

      Change record on sending email

      Post

      Hi there,

      I made a small system to send emails 2 weeks before a date is due. So there is a calc field like this: Date = Get(CurrentDate) +14. After this there is a script that opens with a search function for those calc fields with the value 1 (date is due in 14 days) and send email including info about the record.

      But here is the thing; Lets say a date is due in 2 weeks, but I dont have the time to open Filemaker today and run the script, tomorrow the value will be 0 again because its 13 days untill the date is due. How can I adjust the calc function so that it will stay in 1 untill the email has been sent? Or when that is not possible just stay on 1 untill it reaches the date.

       

      Thanks in advance.

        • 1. Re: Change record on sending email
          mgores

          You could make is so the calc is Date =>Get(CurrentDate)+14 and add a EmailSent field.  You would then have your script check the EmailSent field (If=0 send mail, else goto next record).  If it is =>14 and Emailsent = 0 the script sends the email and sets the EmailSent field to 1.