1 Reply Latest reply on Sep 23, 2010 11:07 AM by philmodjunk

    How can I compare dates to see if it is "open", booked or a holiday?

    BruceBono

      Title

      How can I compare dates to see if it is "open", booked or a holiday?

      Post

      I have a small school. Many tables and relationships. One table, called School Dates is set up to type in dates that are school/state holidays. I have another table called Classes. I would like to be able to have a script that will "expand" the class into a chosen number of classes, with the dates....like one class every Wednesday for 30 times....AND have it compare the classes dates with the School Dates...to avoid holidays...when I schedule.

      I have the script working as far as expanding the one class into multiple, but I cannot figure out how to make the date problem described above to work.

      Thank you for reading and I hope there is enough information for you to clearly understand.

        • 1. Re: How can I compare dates to see if it is "open", booked or a holiday?
          philmodjunk

          Can you post your script so that we can work from it rather than a blank page? You can print a script to PDF and then use a PDF reader's text tool to copy the script's text to the clipboard for pasting here, or if you have FileMaker Advanced, you can generate a database design report and copy the script from there.

          In general terms, if you use a variable to count the number of classes records created to compare to the number requested, you should be able to simply skip the creation of a classes record each time the date matches a record in school dates by not incrementing your counter variable and skipping the step that would create a new record, changing the date of the classes record that matches a holiday date record to the next weeks date instead.