4 Replies Latest reply on Jan 7, 2010 12:22 PM by philmodjunk

    Find date range using script



      Find date range using script


      I have started creating a script using the "help instructions" from the Knowledge Base. I cannot get the line "Insert Calculated Result [Select;aDate;Start Date & ... & End Date] to work on the second script noted I create. It will not let me enter "Start Date & ... & End Date" with out an error telling me "Number can not be evaluated". What am I doing wrong.? How can I get this to work? Everything before tis line has been completed without any problems.



        • 1. Re: Find date range using script

          It didn't work for you because you left out some quotes that are needed.


          Insert Calculated Result is an older method of doing this that you no longer need to use on the most recent versions of Filemaker. Use Set Field instead.


          Enter Find Mode[]

          Set Field[YourTable::aDate; YourTable::Start Date & "..." & Yourtable::End Date]


          Start Date and End Date also need to be defined as global fields for this example to work as written.

          • 2. Re: Find date range using script
               I have entered the line as you suggested. Is now looking to have an "Operator". I am using FileMaker Pro 10. Not sure if this makes any difference or not. Still need your help!
            • 3. Re: Find date range using script

              Some of the syntax needs to be typed in by you, some is supplied by FMP.  Sometimes it's hard to recognize the difference when FMP slips in an extra ";" that you didn't intend.



              Make sure that you are choosing the "aDate" field from the list given by FMP in the upper left window.

              Make sure that you are using the "&" instead of "and" or "+"

              Make sure that, when you're done, the resulting line in Scriptmaker looks like what Phil posted...it is correct.


              Hope this helps...

              • 4. Re: Find date range using script

                Many new users get confused the first time they try to add Set Field to a script. See the following link for step by step instructions:

                Selecting an "All" option with checkboxes


                (You have to scroll down a few posts in the above thread to find the instructions I'm referring to.)