Inserting merge variables onto a layoutYou can create a merge variable that displays a value from a variable. You can use merge variables for some tasks in place of global fields or unstored calculation fields. For example, a merge variable could display the total cost at the bottom of an invoice, or display the name of the account used to print a report.FileMaker recommends that you create global variables for use as merge variables.
2. In Layout mode, click in the layout where you want to insert the variable, then choose Insert menu > Merge Variable.A placeholder merge variable (<<$$>>) appears on the layout.
3. Click between the $$ and >> symbols in the placeholder variable, then type the merge variable name (the name of the variable you created in step 1).Important To ensure that merge values are displayed accurately, each record must be refreshed as it is being browsed, previewed, or printed. You can refresh records manually by, for example, creating a “Refresh” button that calls the Refresh Window script step, or automatically by creating a script that includes the Refresh Window script step.
• To create a merge variable named <<$$acctname>>, which displays the name of the user’s account, create the script step: Set Variable[$$acctname; Value: Get(AccountName)]. Then, insert the merge variable <<$$acctname>> on the layout.
• To create a merge variable named <<$$POnum>>, which appends the text “‑MPO” to the current record number to form a purchase order number, create the script step: Set Variable[$$POnum; Value: Get(RecordNumber) & “‑MPO”]. Then, insert the variable <<$$POnum>> on the layout.
• To display the current page number with the total number of pages in a report (for example, Page 1 of 10), start by creating a merge variable named <<$pp>>, and create the following script for it:Then, combine text, the page number symbol ({{PageNumber}}), and the merge variable on the layout header or footer:
• A variable used as a merge variable cannot include the repetition (index) number of a repeating field (as in the syntax $variable[repetition]) or a file path.
• To remove a merge variable, select the merge variable on the layout, along with the <<, $$, and >> symbols, then press Backspace or Delete.
• The value of a merge variable uses the attributes of the text block it is inserted into (or the layout’s default text attributes, if the merge variable was inserted onto the layout by itself). To change the text attributes of merge values, select the entire merge variable in Layout mode (including the <<, $$, and >> symbols), then select text formatting options. For more information, see Formatting text.
•