4 Replies Latest reply on Jan 18, 2012 8:30 AM by JohnSmith1444

    'The Specified Table cannot be found' error



      'The Specified Table cannot be found' error


      I'm a newbie trying to learn scripting on FMP 10.0 and I'm following this modest tutorial on creating a search program with dates:


      When I input the statement:

      Insert Calculated Result [Select;aDate;Start Date & "..." & End Date]

      I get the error: 'The Specified Table Cannot Be Found'. I've googled all over and can't find any reason for this error- especially since I'm just copying the code from a tutorial and have done everything else specified. 

      (Just to be clear I'm clicking on the second 'SPECIFY' button down which allows freeform entry of code.)

      Can anyone suggest what I might be doing wrong?

      Many Thanks

        • 1. Re: 'The Specified Table cannot be found' error

          This help article suffers from age. I'll bring that fact to the attention of TSGal so she can get someone to updated it.

          Currently, you need to specify fields with this format: Table::field instead of just the field name as shown in this article. That's why you are getting an error here as it is trying to use the field name as a table name.

          Also, current versions of FileMaker no longer need to use an Insert Step to enter such calculated criteria. You can use Set Field instead and this makes for a better script as it is a little bit less "fragile" than an insert step. (Insert steps silently fail to work if the field being "inserted" is not physically present on the layout. Set Field does not have this limitation and this can make for nicer set ups when you need your script to pull up a report and the field for which you are specifying criteria does not have to be on the layout.

          Try using:

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

          Substitute actual table and field names from your file in place of the "your.." entries I've used here. One way to get perfect field references is to add them to your calculation by double clicking the field name in the list of fields shown above the main specify calculation box. FileMaker will add the field to your calculation with the correct table::field format for you.

          • 2. Re: 'The Specified Table cannot be found' error

            Thanks very much for the thorough explanation. I appreciated it.

            I tried the revised code that you suggested, however, I still get the error 'The Specified Table Cannot Be Found', with the 'Set Field' portion of the statement highlighted.

            • 3. Re: 'The Specified Table cannot be found' error

              You don;t enter all that string.  Phil has typed what the final script step would look like.  It is built up (by you) in two parts:

              - click on the button that lest you select from a list the field to set
              - click on the 'Specify' button and set what that pre-selected field should be set to

              So the first step builds the YourTable::yourdateField part.

              The second step builds the YourTable::Start Date & "..." & YourTable::End Date part.

              In the lower 'Specify' button's dialogue you should only be entering (your version of):

              YourTable::Start Date & "..." & YourTable::End Date

              • 4. Re: 'The Specified Table cannot be found' error

                Thanks very much for the clarification. Now it all makes sense and- as you might guess- I no longer get the error.