9 Replies Latest reply on Aug 3, 2012 1:15 PM by philmodjunk

    Date Reminders



      Date Reminders



      I've created a date field, and I would like a pop-up window to open when that date is reached as a reminder to update a report. How do I do that?


        • 1. Re: Date Reminders

          When do you want that reminder to appear? Each time you open the file? Each time you go to a specfic layout? Only the first time on a given day that you open the file or access a particular layout?

          All are possible. All require scripting. Do you know how to create scripts in FileMaker?

          • 2. Re: Date Reminders

            The date will be a date that reoccures every year, and I would like the reminder to appear on that date. I have a general idea of how to create scripts. If you could give me directions (such as which command/script to use) that would be really helpful.

            • 3. Re: Date Reminders

              Answering all the questions that I asked would help me narrow down the options for how to implement this.

              Here's a first cut at such a script:

              Go to Layout [specify layout based on table where this date field is defined. The field MUST be of type date, not text]
              enter find mode [] //clear the pause check box
              Set field [Yourtable::Yourdatefield ; Get ( currentDate ) ]
              Set Error capture [on] //keeps "no record found" dialog from appearing if no records are found
              Perform Find []
              IF [ get ( FoundCount ) ]
                  Show Custom Dialog ["Put your reminder message here"]
              End IF

              There are several ways to set this script to run: When you first open the file, At 10:00 am of every day that the file is open, when you first access a particular layout.

              You can also modify the above script so that it only checks the first time the layout is accessed or the first time the file is opened.

              • 4. Re: Date Reminders

                I appologize for not answering all the questions. I would like it to appear every morning at 10am.

                • 5. Re: Date Reminders

                  How do I set it for that specific time?


                  Also, I don't know how to do the "Get (current date)" part of the "Set field [Yourtable::Yourdatefield ; Get ( currentDate ) ]" command. Do I have to specify a calculated result?

                  • 6. Re: Date Reminders

                    You would ask for that one! Wink

                    I'm assuming you have FileMaker 10 or newer as it will use the Install OnTimer Script script step to set up a "timer" that goes off a calculated number of seconds from when you first open the file.

                    Create a second script :

                    If [ Get ( currentTime ) < GetAsTime ( "10:00" ) ]
                       Install OnTimer Script [ "Name of first script Here" ; GetAsTime ( "10:00" ) - Get ( CurrentTime ) ]
                    End IF

                    add this step to the end of the first script:

                    Install OnTimer Script []

                    This cancels the timer so that it doesn't run the script more than once at 10:00 am.

                    With regards to set field:

                    When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

                    • 7. Re: Date Reminders

                      Forgot one detail:

                      Open field Options and use the settings there to specify that this second script run each time the file is opened.

                      • 8. Re: Date Reminders

                        I am running on Filemaker Pro 10v1 but I can't find the Install OnTimer Script [] on the left hand side of the create script screen. Am I looking in the wrong place?

                        • 9. Re: Date Reminders

                          You should download the free updater to update to 10v3. That fixes a number of bugs.

                          In the script editor. IF you select "show all by category", this step is the last one in the control section, just above the heading named "Navigation".