Getting the BASE tables of FmPro file &/or the "IsBaseTable" of table?


tell application "FileMaker Pro Advanced"
   set TheTables to name of every table of database "DatabaseName"
end tell
 

…Returns NOT the actual tables of the db as created in the Tables tab of Define Database, but, rather, the table occurrences as placed on the relationship diagram. Meaning the list includes multiple occurrences of the base table if it appears on the graph in multiple guises, and also that it includes tables from foreign files if their tables are present on the rel diagram.

Short of a naming convention and a regular practice of always creating base table-names on the relgraph apart and aside from those actually used on layouts and in relationships (yeah, I know, but I inherited this sprawlingly ugly 55-file FmPro solution and they’re paying me to cope with it, not to say “nuke it and start over”…), I’m not seeing any easy way of paring down TheTables to just one occurrence each of the actual native tables of the file.

Where “name of every table of database” gives table occurrences, it would be fantastically useful if someone knows of an equivalent syntax equating to “name of every BASE table of database”. Alternatively, it would be way cool and entirely useful if someone knows of a quality parameter of table I could ask about…something like:

set TheParentDB to the name of the database containing TheTable – ?

or

set Boolean_IsBase to the IsNative of TheTable

or some such thing…

Model: various
AppleScript: FmPro “Perform AppleScript” script step, Fm 8.5 +
Browser: Shiira
Operating System: Mac OS X (10.4)