Database Reference
In-Depth Information
Figure 8-20. Top: This layout uses normal fields, which are always in the same place on the layout,
no matter what record you're on. Notice how the spacing between the contents of each field, partic-
ularly the First Name and Last Name fields, looks odd because it's inflexible. Bottom: By using
merge fields, you can create a more professional-looking result. Plus, it can be a lot more efficient.
Since you don't have much dead space between your merge fields, you can often get more informa-
tion in about the same amount of space.
In FileMaker, you solve this problem using merge fields . Merge fields work a lot like a mail
merge in a word processing program. You create an ordinary text object on your layout (not a
field object) and then tell FileMaker to merge different field values into the text. For ex-
ample, to put the first and last names together on your new layout, you create a text object
like this:
<<First Name>> <<Last Name>>
Merge fields always show up in Layout mode with angle brackets around their names, just
like <<this>>. When you look at this text object in Browse mode, though, you see the value
of the First Name field, then a space and then the value of the Last Name field. Since all
these values show up in a single text object, FileMaker sorts out the exact positions for you.
NOTE
Although you can type the merge field into a text object exactly as it is shown above, this method
can be error-prone. If your field data isn't showing in Browse mode (and you see <<Field Name>>
instead), you probably misspelled the field name. Even a stray space or missing punctuation is more
than FileMaker is willing to ignore. You'll usually find it's easiest to let FileMaker type the name
for you by using the Insert→Merge Field command. That's the process you'll use here.
Merge fields have a downside, though: They're only for display and generally best suited to
layouts you intend to print rather than to work with onscreen. You need a real field if you
want people to be able to get in there and change its contents. Your database already has a
layout with real fields just for editing data (the Detail layout), so in this case, merge fields are
just what the doctor ordered.
Putting merge fields into a text object is easy. Pick a layout—perhaps a duplicate of the
People List with regular fields from the sample file—and do the following:
1. In the Status toolbar, click the Text tool .
FileMaker activates the Text tool; it changes your mouse arrow to an I-beam, and
darkens the Text tool button.
Search WWH ::




Custom Search