5 Replies Latest reply on Jul 24, 2013 8:39 AM by philmodjunk

    Set a specific date on selecting the calendar

    appt

      Title

      Set a specific date on selecting the calendar

      Post

           I need to add the date of birth of students to a database.

           Selecting a drop down calendar means that it starts at the current date, however the students were born years ago and clicking back on the calendar endlessly is no solution obviously.

           Is there a way to get the calendar to default to a particular year when you first click it?

           If not does anyone have a solution for entering a date of birth. Three boxes (Day, month, year) would work i suppose but I'd end up with 3 or even 4 boxes instaed of one which is not very elegant.

           Thanks in advance.

           Andy

        • 1. Re: Set a specific date on selecting the calendar
          ninja

               The calendar starts at the date in the field...or the current date if the field is blank.

               One way to start earlier is to Setfield via script, then enter the field..

               If you make the field itself a button (or drop a transparent button over it that doesn't cover the calendar) that runs a script:

               If (IsEmpty (Datefield) )

                  Setfield (Datefield ; "1/1/1962" )

               EndIf

               GoToField (DateField)

               You may get what you're looking for.

               Be careful though that you don't have a ton of records with DOB = 1/1/1962...always a danger when using a method like this.  People get lazy.

          • 2. Re: Set a specific date on selecting the calendar
            philmodjunk

                 I find that entering dates far different from today's dates are often easiest handled by just not using the calendar pop up. The user can simply type in the date and FileMaker will automatically catch invalid dates. This works best, however, if all your users automatically expect to enter dates consistent with your system's locality settings (always MMDDYYYY or always DDMMYYYY).

            • 3. Re: Set a specific date on selecting the calendar
              appt

                   Thanks to both of you for that. I think you are probably right Phil, the drop down seems like a nice idea and works in some scenarios but this probably isn't one of them. 

                   Cheers

              • 4. Re: Set a specific date on selecting the calendar
                danlee

                     How can I set this up finding data from a field of first date and most recent date.  Example:  I have a field named BodyAgeDate, with one field in it named Weight.  I want to set up Beginning Weight and Current Weight fields where it would take the data from Weight and populate the Beginning Weight and Current Weight.

                     Example:

                     BodyAgeDate 7/12/2013; Weight 233 --> This would be Beginning Weight

                     BodyAgeDate 8/12/2013; Weight 200 ---> If for some reason 7/12/2013 record was deleted or changed to later date, 8/19/2013, then this would be Beginning Weight

                     BodyAgeDate 8/22/2013; Weight 220

                     BodyAgeDate 9/2/2013; Weight 190 ---> This is the most current/recent weight

                     So for Beginning Weight field it would calculate to be 233

                     Current Weight field it would calculate to be 190

                      

                • 5. Re: Set a specific date on selecting the calendar
                  philmodjunk

                       I suggest that you start a new thread as this is a different question. When you make that new post, please include a more detailed description of how you have organized your data into tables.