Database Reference
In-Depth Information
Figure 12-1. Here you can see the Inspector's Position panel. The Jobs tab on the Customer layout
of this chapter's sample file is active, so the Inspector shows its name. Since you and your scripts
are the only ones who'll ever see this name, you don't have to make it pretty for your users. Choose
a simple and descriptive name, though. There's no list of named objects anywhere in FileMaker
Pro, so there's no handy pop-up from which to choose the right name in the Go to Object script
step's option field. Quick tip: After you name an object, select the name and copy it. Then go to the
script step and paste. The process also works in reverse. That is, if you're writing a script and real-
ize you haven't given your object a name yet, no worries. Go ahead and refer to the name you want
to use in the script step. Copy it and then go to the layout, select the object and paste the name into
the Inspector. FileMaker Pro is flexible like that.
Why, though, would you bother naming a field when you can just use the Go to Field
script step? If there's only one copy of a field on a layout, then you don't need to name the
field. But if you have two copies of a field on a layout, but need a script to go to a specific
one, then name it, and use Go to Object instead. A common reason for having two versions
of the same field on a layout is when you have two portals from the same relationship on a
layout. You might have one portal show all the records in the relationship and the other
portal filtered to show just records with “Active” in their Status fields ( Portal Filtering ) . You
might also need two or more copies of a field to show the same data on multiple tabs on a tab
control.
NOTE
You should always name web viewers if you're scripting any interaction with them, because the Set
Web Viewer step ( Set Script Animation ) requires you to address web viewers by name.
You can use any naming scheme you want, but here are a few rules to keep in mind:
Search WWH ::




Custom Search