1 Reply Latest reply on Sep 29, 2014 1:22 PM by philmodjunk

    Send Mail Script Associated with Radio Button, Dates

    annacangialosi

      Title

      Send Mail Script Associated with Radio Button, Dates

      Post

      Hi, I am new to File Maker and working with a Knowledge module that has already been set up in my company's File Maker database. My task is to set up an Update field for new entries so employees who enter a new piece of information can select to be notified "yearly", "monthly" "quarterly" "never", or verify on",  via e-mail, to review the entry and make sure it is current.

      I have gone through the FileMaker Training Basics Scripting chapter and Lynda.com FileMaker Essential Training and am still not sure on the commands or parameters to use. 

      This is my first attempt, and I know it needs work. 

      Is there a multiple step script source available that you can point me to? 

      If [ Text DB::updates = "yearly" ]

      email whoentered, one year from whenentered

      Else If [ Text DB ="quarterly"]

      email whoentered, four months from whenentered

      Else If [Text DB::updates="monthly"]

      email whoentered, one month from whenentered

      Else If [Text DB::updates="never"]

      do nothing

      Else If [Text DB::updates="verify on"]

      email whoentered, on specified date

      End If

      Thank you,

      Anna

      Script-email-reminder.jpg

        • 1. Re: Send Mail Script Associated with Radio Button, Dates
          philmodjunk

          I suggest a calculation field that calculates an Email Date based on the value of DateEntered and the update option specified:

          Let ( [ m = month ( DateEntered ) ;
                     d = Day ( DateEntered ) ;
                     y = Year ( DateEntered )
                   ];
                    Case ( Updates = "Yearly" ; Date ( m ; d ; y + 1 ) ;
                                Updates = "Quarterly" ; Date ( m + 3 ; d ; y ) ;
                               Updates = "Monthly" ; Date ( m + 1 ; d ; y )
                              ) // Case
                ) // Let

          A script scheduled to run once a day can perform a find for all records with EmailDates with today's date and then send out your emails.

          Not sure what "use" means with your "verify on every use" option, but that would probably be handled by a different script. Tripped each time the record is "used".