Jump to content
Server Maintenance This Week. ×

inconsistent behaviour with show record script


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

Recommended Posts

I have the following script step

Tell application "FileMaker Pro Advanced"

Tell Database "MyDatabase"

set TheResult to field "Status" of (every record whose cell "TheFlag" = TheVariable)

End tell

End tell

This will work once or twice then give me a "event not handled" error. And that is with the same values for TheVariable.

I have used different ways to refer to this info, calling "whose cell 8 = TheVariable" etc... The result is all the same, it works once then will give an event not handled.

Any ideas?

Edited by Guest
Link to comment
Share on other sites

Well read up upon the disitinction between the reserved words "database" and "document" in respect to found sets.

Similar is there a distinction between cell and field....


tell application "FileMaker Pro Advanced"

	show (every record of database 1 whose cell 1 is "")

	set field 1 of document 1 to "bb"

end tell

Putting it into a try clause doesn't hurt!

--sd

Link to comment
Share on other sites

I am was trying to extract the data from a specific field from the found set done by my (show all records whose...).

Anyway I figured it out, the database must be the frontmost window otherwise the script gives the error. I just pop the window to the front in the script before calling this routine.

Thanks

Manuel

Link to comment
Share on other sites

Yes I did look it up, thanks. I wasn't aware of the distinction between document and database, that will solve alot of my headaches. However specifying the table name hasn't solved my problem.

this script

tell application "FileMaker Pro Advanced"

tell database "Task_Manager"

tell table "Task_Manager"

set taskcount to count (every record whose cell "Status" = "Active"

end tell

end tell

end tell

still fails if the Task_Manager database is not the frontmost FM window, otherwise it works fine.

thanks

Manuel

Link to comment
Share on other sites

This topic is 5591 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
×
×
  • Create New...

Important Information

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