Jump to content

Specified Table cannot be found error in a calc field


This topic is 2569 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm getting the error "Specified Table cannot be found"

In a field script trigger, I seem to be incorrectly targeting a table even though I am double clicking it out of the field list

 

The script is:

If[not IsEmpty(Servetrack2014::QuickFind)] /  /prevents searching for a null value//
Perform Quick Find(Servetrack2014::QuickFind
End If
 
I do have two tables being used in the database. Does that cause problems?
 
 
 
Screenshot%202014-07-17%2019.48.52.png?d
 

 

 

 

Link to comment
Share on other sites

After the ServeTrack_2014::QuickFind)] 

 

you have / (spaces) /

 

if you wish to insert a comment on a line, you must have them without the space between, i.e. //

 

and remove the // at the end of the line.

 

single-line comments must remain on same line as // add comment here

Link to comment
Share on other sites

Also, Perform Quick Find is a script step ... not a function.  :-)


Script:

 

If [ not IsEmpty ( ServeTrack_2014::QuickFind ) ]

Perform Quick Find [ bla bla ]

Else

... whatever

End If

 

Hang in there, Graham, you'll learn to love this stuff!

Link to comment
Share on other sites

Also, Perform Quick Find is a script step ... not a function.  :-)

 

What do you mean "also"?

 

 

In a field script trigger, 

 

I am not sure where exactly you are (your title says "in a calc field", but that's not what your screen shot shows - based on the quote above, I'd say you are trying to define a triggered script's parameter.

 

In any case, scripts are not written in any 'Specify Calculation' window. Scripts are composed in an 'Edit Script' window, which you'll get by selecting: Scripts > Manage Scripts…  then clicking the [+New] button.

Link to comment
Share on other sites

I meant 'also' because I spotted two errors ... the first was improper use of the Comment (LOL) // and the second was defining Perform Quick Find in a calculation dialog. :-)

Link to comment
Share on other sites

Yeah, I spotted the comment error first and thought that was the reason for the break.  After looking again, I spotted the script step in the calc, LOL, so I posted again with 'also...'

 

I appreciate the fine-tuning pick!!  Keep it up!!   :yep:

 

So instead of posting 'also' (almost as a secondary afterthought), I should have recovered from my almost-oversight and added, "but the REAL problem is that you have NO ENGINE!" Is that better?

 

I'm still laughing at the image of that car.


Okay, no, I should have reviewed more completely before posting at all  (I can get ahead of myself a bit) and then mentioned the missing engine FIRST since it was the most critical, LOL.

Link to comment
Share on other sites

Hi Guys. Thanks for the responses and your patience.

 

This script (if I can get the syntax right)  is supposed to fire onObjectSave on the field QuickFind.

Ultimately, after I learn my way around,  I am looking to create a Google-like search bar within the layout.

 

The steps to get to the Specify Calc window

1) Right Click the QuickFind field and select 'Set Script Trigger...."

2) Check OnObjectSave

3) Click the Edit Button next to the Option Script Parameter Window

4) Enter the script

 

 

Even removing comments and the Perform Quick Find  command gives the same 'specified table cannot be found error'. Any ideas?

If [ not IsEmpty ( Servetrack2014::QuickFind ) ]
End If

 

 

 

Screenshot%202014-07-18%2010.37.02.png?d

Link to comment
Share on other sites

That is not how it works. You need to create the script first. Only then you can set up a script trigger that would cause the (already existing) script to run on some event, and - optionally - pass it a parameter.. Please make sure you have (at least) gone through the tutorial, before trying out stuff "by the feel of it". Filemaker is not an intuitive application.

Link to comment
Share on other sites

There is no need to even set up a script parameter to do what you are doing.

The process for setting up a triggered script is:

Write the script that is going to be performed

Then in the trigger setup; SELECT this script

Then in trigger setup, optionally pass a script parameter.

 

But to perform a quick find, you generally don't need a parameter.

 

Since these are all basic steps in using ANY script, such as attaching a script to a button, it seems that you will need to review basics of how scripts are written and how they are linked to objects.

post-62898-0-33345700-1405706892_thumb.p

post-62898-0-82983500-1405706903_thumb.p

Link to comment
Share on other sites

I finally figured it out. I thought you could write the code in the calculation field. Instead, it seems that Filemaker wants you to add pre-configured commands and construct a full script. With respect, if I've learned anything so far, it's don't fight the way filemaker does things. I'll read a bit more to get a handle on the FM way. Am nearly done with this project, and then, back to Angular, Sass, Bootstrap, Node, and an assortment of open source sql/nosql databases :)

Link to comment
Share on other sites

This topic is 2569 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.