4 Replies Latest reply on Mar 20, 2013 9:20 AM by philmodjunk

    How to send the automaically email without opening database file

    RaguPathiG

      Title

      How to send the automaically email without opening database file

      Post

           HI Every one.

           how to send the automatically email without opening database

           i use the Field  use Date and Current date

           in usedate i split day month year and same as current date  day month year

           if (usedate_year = Currentdate_year )

           if (usedate_month = Currentdate_month)

           if (usedate_day =Currentdate_day)

           Send mail ( ******************)

           End if

           End if

           End if

            

           But this Script is not working

           can any one help me what to do in this Case ???

           it should check first record to till last record automaically with out opening the database file ??

           or else guide me how to write different script for this case ???

            

            

            

        • 1. Re: How to send the automaically email without opening database file
          philmodjunk

               SInce the file has to be open before it can do anything, I need to make sure that I understand what you mean when you say: "without opening database"

               Do you mean that you want this script to be performed every day without having to set the script to perform each time the file is opened?

               If so, this is possible if the file is always open on the server with it hosted by either FileMaker Pro or FileMaker Server.

               Is that what you have? Which applcation, Pro or Server are you using to host the file? (How you do this depends on which application hosts the file.)

               It's also possible to set up a script to do this each time that the file is opened, but with additional If steps that keep it from doing anything more than once each day and can even include ways to process emails not sent the previous day due to the file never being opened.

               A simpler script would be to find all records with the specified date instead of looping through them and checking the date in each record.

               Here's a thread that shows a number of different examples of scripts that perform finds for records using criteria entered into date fields: Scripted Find Examples

          • 2. Re: How to send the automaically email without opening database file
            RaguPathiG

                 Thanks lot

                 your answer is very useful for me

            • 3. Re: How to send the automaically email without opening database file
              RaguPathiG

                   hi Philmodjunk

                   What i am trying to say is

                   i need to send email

                   In one field i look the Date of Birth. Now what i need is I need to sent email

                   eg: Date of Birth (26/7/1993) = Today Date (26/7/2013)

                   Now i need to sent the email to User Many more Happy returns of the day 

                   Today's Date:
                   Set FIeld [YourTable::YourDateField ; Get ( CurrentDate ) ]

                   in this case it will check only date but i need to check month as well as date

                   Can help me In this Case

                    

              • 4. Re: How to send the automaically email without opening database file
                philmodjunk

                     You can define an unstored calculation field in your table that produces the date of the person's birthday for this year:

                     Date ( Month ( dateOfBirthField ) ; Day ( DateOfbirthField ) ; Year ( Get ( CurrentDate ) ) )

                     You can then perform a find for all records where this calculation field has today's date.