Creating and managing layouts and reports > Adding fields to a layout > Placing merge fields on a layout
 
Placing merge fields on a layout
Use merge fields to combine field data and text in documents like form letters, labels, envelopes, or contracts. You create merge fields in text blocks, which allows you to use static text and field data together.
Merge fields shrink or expand to fit the amount of text in the field for each record. For example:
When the field <<First Name>> is between the text Dear and a colon (as in Dear <<First Name>>:), FileMaker Pro displays Dear Charles: in Browse mode or Preview mode if the First Name field contains Charles.
When a merge field is on a line by itself and the field contains no data (such as an empty Address Line 2 field in a mailing label), FileMaker Pro removes the blank line from the text block, which improves the appearance of the text.
Note  In Browse mode, you cannot enter or edit data in merge fields. For entering data, use a different layout that contains regular fields that permit data entry.
To place a merge field on a layout:
1. In Layout mode, do one of the following:
To create a new text block containing a merge field, click with the arrow pointer where you want the text block to appear.
To insert a merge field into an existing text block, click the Text tool Text tool in the status toolbar, then click in the text block to place the insertion point where you want to insert the merge field.
2. Choose Insert menu > Merge Field.
3. In the Specify Field dialog box, select the field to insert.
To choose a field in a related table, choose the table from the tables list above the list of fields. Or choose Manage Database to create a new field, table, or relationship.
4. Click OK.
You see the field name enclosed by double opening (<<) and closing (>>) angle brackets in the text block.
5. Choose if you want the merge field to be enabled or disabled for quick find. For more information, see Configuring quick find. By default merge fields are included in the search.
If a merge field is enabled for quick find, only the fields referenced in the merge field will be included in the search. For example, if the merge field Departing from <<DepartureCity>> is enabled for quick find, and one of the records contains New York for the DepartureCity field, searching for New York finds the record but searching for Departing from New York does not find any records.
To remove a merge field: Select the field name (along with the << and >> symbols), then press Backspace or Delete.
Notes
You can insert punctuation, spaces, line breaks, and text between merge fields as needed. Be careful not to type extra characters inside the << and >> symbols.
You can insert a merge field directly into a text block by typing the field name surrounded by two opening and two closing angle brackets, like this: <<field>>. Make sure you use angle brackets and not the single-character quotation marks (« and »), which won’t work.
To specify attributes to be used when you browse, preview, or print the field data in a merge field, in Layout mode, click the Selection tool Selection tool in the status toolbar, select the text block, then select formatting options in the Inspector. For formatting text, use the Appearance Appearance tab in the Inspector (click Inspector Inspector button in the layout bar). For formatting data (number, date, or time), use the Data Data tab in the Inspector. See Formatting text and Formatting and setting up field objects in Layout mode.
If you apply formatting (like style, color, or size) to the contents of a text field in Browse mode, that formatting is also applied to a merge field based on that text field, even when the merge field is used on another layout.
In Browse mode and Preview mode, a text block displays and prints only as much text as will fit within its dimensions. Because merge fields often display a variable amount of data, the contents of a text block may be clipped and may not appear in its entirety. If necessary, resize the text block to display all of the text. For information on resizing text blocks, see Resizing and reshaping objects.
You can also use a merge variable to display data. See Inserting merge variables onto a layout.