Database Reference
In-Depth Information
listed in Layout mode. The result of the calculation determines which layout to visit by
number.
Like record numbers, layout numbers reflect the current state of the database and aren't reli-
able ways to identify a layout. First, layout numbers don't necessarily correspond to their po-
sitions in the Layout pop-up menu because not all layouts show in the menu (you can turn off
their display—see Setting Layout View ) , plus you can reorder them manually. To find out a
layout's number, you have several choices. The manual method is to switch to Layout mode
and then go to the layout in question. In the Status toolbar look at the Layout box. It shows
which layout number you're on. Better yet, use the Get(LayoutNumber) function in the
FileMaker Pro Advanced Data Viewer ( The Data Viewer ).
See the box on Specifying a Layout to learn when to use Go to Layout with Layout Name
and when to use Layout Number.
Go to Object
Go to Object is massively useful, because you can go to (or activate) any object on a lay-
out, thereby setting up the context for the steps that follow. You can also use Go to Object
to activate a tab control that's not the automatic tab. Say you have a layout with a tab control,
and the user clicks a button on the third tab. If the button's script has to leave the layout to
run part of its process (say you need to run over to the Line Item layout and create a line item
record before switching back to the original layout), then FileMaker will activate the auto-
matic tab when it returns. But that's confusing and annoying to your user, who almost always
wants her screen set up just like it was before she clicked a button. To smooth those ruffled
feathers, name the tab where the button resides and then add a Go to Object step at the end
of that button's script.
Naming Objects
Give objects a name with the Inspector ( Figure 12-1 ). This name is in addition to any other
name or identifier it has, such as a fully qualified field name (Invoices::InvoiceID or Cus-
tomer::Full Name) or any internal FileMaker IDs. You can name any object on a layout, but
there's usually no reason to unless you need to use the name in a script.
Search WWH ::




Custom Search