Basic FileMaker Pro 7 Help


I know that I should be able to find this out, but my head is not working.

Can anybody give me a simple script for FileMaker Pro 7 that
a) opens the database
b) selects a table
c) selects a set of records according to whether a field contains the word “Maritime”
d) sorts the records according to the contents of a second field (a number)



This is a good example of where the new FileMaker 7 object hierarchy can kick your butt :slight_smile:

There are 3 objects, which can have different names in FileMaker:
Table (base table, what you define)
Table Occurrence (TO, what you see in Relationships Graph and lists)

AppleScript doesn’t talk to table (base table), even though that’s what it sounds like; it talks to table occurence. I named them (below) so you can see which is which.

Then there’s “database” (all the records) and “document” (found set).

Anyway, the following works (I’m assuming you meant “open the file on disk,” otherwise that line isn’t needed; neither is “activate”):

tell application “FileMaker Developer”
open alias “Macintosh HD:Users:fej:Desktop:OpenSort.fp7”
tell database “OpenSort”
show (every record of table “DataTO” whose cell “Name” is equal to “Maritime”)
end tell
tell layout “DataLayout”
sort by field “Rank”
end tell
end tell