January 5, 200917 yr 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 January 5, 200917 yr by Guest
January 7, 200917 yr Can you explain a bit more what you are trying to do here? I'm not following what you are trying to accomplish.
January 7, 200917 yr 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
January 8, 200917 yr Author 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
January 8, 200917 yr 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
January 8, 200917 yr Author thanks for the info I'll give that a try, will make my code cleaner. Manuel
January 8, 200917 yr And you are aware where to look up the properties tree? The Folder English Extras contain a file called: Apple Events Reference.fp7 --sd
January 8, 200917 yr Author 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
Create an account or sign in to comment