FrameMaker Tips | Using Variables

Posted on: July 20, 2020 / FrameMaker Tips /

FrameMaker Tips

Using Variables

Variables can be a useful way to update a file, but they can also cause a lot of problems.


Category: Using FrameMaker

Relevance: All Manuals


In FrameMaker, you have system variables and user variables. System variables are maintained by FrameMaker, such as current date or filename. User variables are variables that you define in FrameMaker, such as company name or product name.

User variables

Each user variable has a name and a definition. When you change the definition of a user variable, all occurrences of the variable in your document are updated to use the new definition.

Variables pod

You can use the Variables pod (View > Pods > Variables) to insert, edit, or delete system and user variables.

Insert a variable

To insert a variable:

  1. Click to place the insertion point where you want the variable to appear in the document.
  2. Double-click a variable from the Variables pod to insert it or click the Insert icon on the pod toolbar.

Working with a variable occurrence in text

To delete one occurrence of a variable, click once on the variable in the text to select it (double-clicking will activate the Variable pod), then press Delete.

To copy or move a variable, select it and choose Edit > Copy, Edit > Cut, or Edit> Paste.

To replace a variable with another variable, select the variable in the text, then double-click a different variable in the Variables pod.

If a variable is on a master or reference page, you cannot edit its occurrence from the body pages.

Delete a variable

Select the variable in the Variables pod, click on the Delete icon in the pod toolbar.

Note: Deleting a variable definition from the Variables pod converts all occurrences of the variable in your document to editable text.

Edit a variable definition

If you edit a variable definition, all occurrences of the variable in the document are updated.

You can change the variable name and the variable format from the Add/Edit Variable panel.

  1. Select the variable from the Variables pod and click the Edit button.
  2. Edit the variable name or change its definition in the Add/Edit Variable panel and click Edit.

Convert a variable to text

You can convert a variable to editable text and then edit the text in the document. If you convert the variable to text, however, the text is no longer updated when the variable definition changes.

  1. Select the variable, click Convert To Text from the Variables pod.
  2. Do one of the following:
    • To convert a single occurrence of a variable, click Selected Variable.
    • To convert all occurrences of a particular variable, select the variable in the Variables Named scroll list.
    • To convert all variables in the document, click All Variables.
  3. Click Convert.

The problem with variables

It’s easy to update a variable in all the files in a book using Import Formats. Unfortunately, you cannot update just one variable. Import Formats updates all of the system variables as well as all of the user variables. Because we use system variables in headers and footers, this has caused problems in the past. A simple user variable update caused system numbers to disappear from pages in several manuals because it also updated a hidden system variable.

Other problems:

  • The Spelling Checker cannot check the spelling of variables.
  • Find/Change cannot find the contents of a variable, although it can find a variable name.
  • The checker programs do not check the contents of variables.

If only used in one file, a variable offers little advantage over using Find/Change to replace placeholder text.

Talk to an expert today!
+1 (503) 668-0656 See Our Project Sample