6 Replies Latest reply on Oct 16, 2013 2:48 PM by philmodjunk

    Script for automated email based on date

    jasoncaldwell

      Title

      Script for automated email based on date

      Post

           Hello,

            I am very new to file maker pro and I am wanting to generate an automatic email notification when the current date matches that in one of the fields of an entry, is this possible and if so can someone tell me how to accomplish this?  Thank you. 

            

        • 1. Re: Script for automated email based on date
          philmodjunk

               I'm not sure if this is what you want, but a script can perform a find for all records where a data field is the same as today's date. If any records are found, then the script can send out an email.

               This script can be set up so that it is performed once a day the first time that a user opens the database file. Or a robot file can use your email client to do this once a day or a schedule on FileMaker Server can use an SMTP email server to send out an email once a day.

               Does this sound like what you want to do? Can you specify some more details and let us know which parts of that outline you do not know how to implement?

          • 2. Re: Script for automated email based on date
            jasoncaldwell

                 Either of the scenarios you mentioned sound like they will fit the bill. I am using file maker pro 12 and the starter solution for contacts. right now there are about 100 entries but there will soon be several thousand. Each entry has a field labeled coverage end date i would like the entry or a copy of it emailed when that date is met. as far as implementation i am a complete newbie, i was looking around at new script if >coverage end date = date am i on the right track or am i way off? 

                  

            • 3. Re: Script for automated email based on date
              philmodjunk

                   Let's divide this process up into several steps and get each part working as a separate script. You can start out manually performing each script and then later can add a "master script" that performs each of the smaller scripts in turn and that implements one of the methods I mentioned for doing this on a daily schedule.

                   The first part is to find all records where the Coverage end date has today's date. Do you know how to enter find mode manually and use today's dates to find these records?

                   Do you really want to find all such records with today's date or wouldn't it make more sense to find these records before the coverage end date is actually reached such as 7 days or some other specified interval in advance so that the contact can renew coverage before it expires?

                   Have you ever created a FileMaker script before?

                   If you can get a manual find to work, you might take a look at this thread on scripted finds while waiting for a response from me or some other member of this forum community: Scripted Find Examples

              • 4. Re: Script for automated email based on date
                davidanders

                     You do not mention Win or Mac, in my Googling I found this interesting scripted html emails on Mac from FMP with Applescript thread

                https://discussions.apple.com/thread/2728575?start=0&tstart=0

                • 5. Re: Script for automated email based on date
                  jasoncaldwell

                       Hi David, I am using a mac. 

                  PhilModJunk , i have never created a script before. i have been able to do a manual find based on other criteria. you bring up and interesting point about the date, while it is not significant to find it in advance if the date were to fall on a weekend there would be no one to open the data base so the script would not run. 

                  • 6. Re: Script for automated email based on date
                    philmodjunk
                         

                              if the date were to fall on a weekend there would be no one to open the data base so the script would not run.

                         Once you have the script working, there are several different ways to set up a script to run once a day--even if there is no one around to open the file.