2 Replies Latest reply on Apr 24, 2017 8:19 AM by jeffsb

    Running button script results in error message

    jeffsb

      We have FileMaker 14, hosted on Triple8. The treasurer of our small nonprofit has asked me to create a way for him to choose the list of donations (from the donations table) between two dates.  I created a table called DateSearch with two fields, both global and both date fields: BeginDate and EndDate.

       

      I created a button that runs the following script:

      Set Field By Name [ DateSearch::BeginDate; "" ]

      Set Field By Name [ DateSearch::EndDate; "" ]

      Go to Layout [ “DateSearch” (DateSearch) ]

      Pause/Resume Script [ Indefinitely ]

      Go to Layout [ “DonationList” (Donations) ]

      Sort Records by Field [ Ascending ; Donations::Date_of_donation ]

      Enter Find Mode [ ]

      Set Field By Name [ Donations::Date_of_donation; DateSearch::BeginDate & "..." & DateSearch::EndDate ]

      Perform Find [ ]

       

      In the script, the first two lines are supposed to blank out the two global fields, BeginDate and EndDate but they don't seem to work -- but that is not the main question. I created a layout called DateSearch which allows the operator to specify the begin date and end date, which is inserted in the global fields BeginDate and EndDate. The script goes to that layout and then pauses. The operator then enters the appropriate dates and then resumes the script. The next line goes to the donation list layout which is based on the donations.

       

      The last three lines enter find mode and put BeginDate into the date of donation field and then three dots and then EndDate. FileMaker gives the following error message: "The provided find criteria is not valid. Enter a valid request before proceeding." What am I missing? Thank you for any help you can give with this!