2 Replies Latest reply on Nov 30, 2015 10:31 PM by g4guitar

    Is there a way to script a reminder based on a date?

    g4guitar

      I want FM to email me a reminder automatically based on a date just like would happen in say iCal or Google calendar. In this case I will set a date for when I need to follow up on a contact. Is this possible in FM? Thank you.

        • 1. Re: Is there a way to script a reminder based on a date?
          BowdenData

          Definitely. The basics I would recommend depend on whether or not your database is hosted/running on FM server or if you just have it running on your own computer.

           

          Hosted dB

          ----------------

          Create a script that finds all records where the reminder date field is equal to today. Loop through those records and send an email (using the SMTP option of the Email script step). Then, create a server scheduled task that runs this script on a regular basis. It sounds like you would want this to run once a day in the morning. The idea here is that you could have the FM server run this task say every day at 6am, so that when you arrive at work, the email(s) will be waiting.

           

          Local dB

          -------------

          Create the same script as above, but call it in your Startup script for the dB. That way, whenever you open the dB, it will send out emails as needed. Emails would typically only be generated the first time you open the dB on a given day. Subsequent opening of the dB would likely find 0 records to be emailed about unless you were to create a new record and set the reminder date to "today" or edit an existing record to set the reminder date to "today".

           

          Hope this gives you some ideas.

           

          Doug

          • 2. Re: Is there a way to script a reminder based on a date?
            g4guitar

            Thank you for that. I worked out the script except I am not clear on how to loop the emails so if you have any advice that would be great. Thank you.