Manage variables

From the Variables pod you can create and delete user variables, edit user and system variables, or convert variables inserted in a document to editable text.

This section covers the following topics:

Creating user variables

Editing user and system variables

Deleting variables in a document

Converting variables to text

Importing variables from one document to another

Creating user variables

You create and add user variables, to display custom information in a document. For example, you can create a variable, author_name, that specifies the name of the document author. Or, you can create a variable, product_name, to specify the name of the product.

To create a user variable:

1)In the Variables pod, click Insert.

The Add/Edit Variables dialog is displayed.

Add/Edit Variables dialog

add_edit_variable_vr.png

2)Enter a name for the variable: product_name.

important:   If you enter name that is used by an existing variable (system or user), the definition of the existing variable is overwritten.

3)Enter a definition for the variable.

For example, you can enter the definition as Adobe FrameMaker for the variable product_name.

You can also specify a character format for the variable by preceding the variable definition with the character format.

To apply a character format to the definition of a variable:

a)Click a character format in the list.

The character format is added to the variable definition.

b)Follow the character format by the variable value. For example:

<Callout>Adobe

You can also add multiple character formats to the different text in the variable defini­tion. For example:

<Callout>Adobe <emphasis>FrameMaker

4)To create the variable, click Create.

After you create a user variable, you can insert the variable into your document. See Insert variables.

Editing user and system variables

You can edit the definition of a system or user variable. A User Variable definition can include char­acter formats of the document. A System Variable definition can contain FrameMaker building blocks other than character formats. For example, the default format for the Creation Date (Short) system variable is: <$monthnum>/<$daynum>/<$shortyear>. You can edit this to any other format such as: <$daynum>/<$monthnum>/<$shortyear>. Similarly, you can change either the definition and / or the character format applied to a user variable.

To edit a variable

1)Select the variable in the Variables pod and click Edit.

The Add/Edit Variable dialog is displayed.

Add/Edit Variables dialog

edit_variable_vr.png

2)Edit the definition of the variable:

User variables:

You can edit the name, definition, or the character format of a user variable. For example, you can update a product_name variable: <Callout>Adobe <emphasis>Frame to <Default ¶ Font>Adobe <Emphasis>RoboHelp.

System variables:

You can edit the definition of a system variable using the variable definitions available in the Building Blocks list.

You can include character formats to System variables as you do when Creating user variables.

note:    You cannot change the name of a system variable.

3)To save the update to the variable, click Update.

note:    When you edit a user variable, the Add/Edit Variable dialog displays the Add and Edit buttons. If you change the name of the user variable and click Add, a new user variable is created. However, since you cannot create system variables, the Add button does not display in the Add/Edit Variable dialog.

Deleting variables in a document

You can delete the user variables that are no longer required for use in the document. You can also delete the occurrences of a system or user variable added in a document.

To delete a user variable

When you delete a user variable, the variable definition is removed from the document catalog. After this, the variable is no longer available for use in the document.

1)Select the user variable in the Variables pod and click Delete.

note:    If you select a system variable, the Delete button is disabled.

2)If the variable is used in the current document, you are prompted with the message that all occurrences in the document will be converted to editable text. Click OK to delete the variable and convert all its occurrences to text.

To delete a variable occurrence

You can choose to delete specific occurrences of a variable in a document. This retains the definition of the variable in the document catalog and other occurrences of the variable in the document.

1)Select the user or system variable occurrence in the document and click Edit in the Variables pod.

The list at the bottom of the dialog, displays the occurrences of the selected variable in the current document. Also, the currently selected occurrence is highlighted in occurrences list:

Selected product_name occurrence on page 6 highlighted

locate_var_vr.png

2)To remove the selected occurrence, press the Delete key or click Delete below the occurrence list.

In this case, the variable occurrence and the associated text is removed from the document.

note:    If you use the Delete key to remove the occurrence, you can inadvertently delete adjoining content. Use the Delete button on the dialog to ensure that you only delete the variable occur­rence.

You can also select an occurrence in the list and click Go to Location to navigate to the location in the document where the occurrence is located.

Converting variables to text

You can covert the variables in a document to text. This removes the reference of the variable from the document and makes the converted text editable.

1)In the Variables pod, click Convert to Text.

The Convert Variables to Text dialog displays.

Convert Variables to Text dialog

convert_var_to_text_vr.png

2)You can choose to convert:

Selected Variable:

All occurrences of the variable selected in the Variables pod.

Variable Named:

All occurrences of the variable selected in the variable list.

Variables with Element Tag

All occurrences of an element tag assigned to a variable.

All Variables

All occurrences of all variables in the document.

3)Click Convert.

Importing variables from one document to another

The variables in a document are available for use in the document where they are created (user vari­ables) or edited (user and system variables). You can make these changes available to other docu­ments by importing the variables definitions.

To import variable from one document to another

1)Open the document containing the variable definitions that you need to make available in one or more other documents.

Open the document into which to import the variable definitions from the source document.

If you are working in a FrameMaker book, you can multi-select the documents in the book into which you want to import the definitions.

2)From the File menu, choose Import > Formats.

3)In the Import Formats dialog, click Deselect All, check Variable Definitions, and click Import.

important:   If the destination documents contain user variables with the same names as the source document, the user variable definitions are overwritten. Also, if the definitions of system variables in the source document are updated, the definitions of the corresponding variables in the destination documents are overwritten.


September 30, 2016

Legal Notices | Online Privacy Policy