Considerations for associated files and interfaces 79
Earlier versions of FileMaker Pro (version 6.x and earlier) defined a special layout, layout 0, a
layout with a 0 index, to give the scripter access to the single table for a database. FileMaker Pro 7
still supports the layout 0 concept for backward compatibility, but layout 0 can only be used to
represent table 1 of the database.
Using 0 as the index for layouts generates an object specifier to table 1 of a FileMaker Pro database.
The value of the
pKind property of a cFMTable object is table, and view for cTable (layout). To
access fields of other tables, use the table object cFMTable instead. For clarity and forward
compatibility, it is recommended that you convert existing scripts to use the table object instead of
layout 0.
The cColumn elements of a cTable object correspond to the fields appearing on a FileMaker Pro
layout, while the cColumn elements of a cFMTable object correspond to the fields as they appear
in the Define Database dialog box for that table. To view fields for a table, choose File menu >
Define
> Database, click the Fields tab, and select the table from the table pop-up menu.
Note cTable, the constant value for layout objects used in the previous versions of FileMaker Pro,
is still supported. The mapping of the layout object to
cTable has not changed.
New "window" object
FileMaker Pro 7 supports the ability to view multiple windows per document. When you reference
a window by index (
window 1, window 2, and so on ), then windows will be considered to be
organized according to their order on screen. For example, if window 1 is the foreground window,
window 2 is the window behind the foreground window, and so on, regardless of the document to
which they are related.
To reference windows according to their relation to a specific document, use the syntax window 1
of document 1, where window 1 of document 1 is the first window created for document 1.
It is not necessary to specify the window object if you are using the current record and current
layout properties. For example, a statement such as tell application "FileMaker Pro" to
get current record will return a reference to the current record from the foreground window.
New "repetition" object
A single cell can contain multiple repetitions. The repetition object provides more control over
data accessed from the database.
Repetition 1 of cell 1 of window 1 represents the first cell displayed on the window's
current layout. For example, if a cell has five repetitions, and that cell's layout format is set to
display only repetition 2 to 4, then
Repetition 1 of cell 1 of window 1 will get the data of
repetition 2. To set data from repetitions that are not currently visible, use the syntax Repetition
1 of cell 1 of table 1, which in this case will return the data of repetition 1.
Field order changes
For Apple events, the field order of a table cFMTable is the field creation order. (To view the field
creation order for a table, choose File menu > Define > Database, click the Fields tab, select the table
from the table pop-up menu, and choose
View by creation order.) In contrast, the fields order of a
layout
cTable is the graphical order in which the fields appear on the layout, moving from top left
to bottom right.