Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted (edited)

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
Posted

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

Posted

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

Posted

With fm7 disapeared "layout 0" but if you look at the object model, will you see the reserved word then is "table" ... this means you still can ignore the visibility of windows!

--sd

Posted

And you are aware where to look up the properties tree? The Folder English Extras contain a file called:

Apple Events Reference.fp7

--sd

Posted

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

This topic is 5796 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.