How to Make Use of User Variables in Document Publisher

Where can Variables be Placed

All User Variables in Document Publisher can be used throughout the template. You can use the variables within Headers, Footers, boilerplate text and document titles.

What are Variables?

The Variables store bits of data to be used in tags that allow the use of either a variation of data or static data.

For example the variable $UserName is static will only output the currently Logged in Users Name within the document. The User Name will also be output if the template is being generated through the Phase sidebar in WorkBench.

Some variables can be used to hold items identities in a static list like $IDList or lists of item identities collected from Hierarchy Tables like $ItemList. The lists for $ItemList can change depending on cross references and/or if the template uses parameters.

Creating User Variables is easy. Read How to Create a Variable to find out.

User Variables in Headers and Footers

The variable tags can be used within a Header and/or Footer in conjunction with Microsoft® Word’s own data fields.

In the Word tab, select the Header or Footer option. Then select the Edit Header/Footer option. Once the Header/Footer is open, select the User Variable button and the variable you wish to use.

Several variable tags can be placed to output within the Header/Footer so you get the output required. These tags can also be formatted.

When editing the Header or Footer the View will change to Print View as they don’t show in Draft view.

Doc Pub user variables in a header
Using variables in a Word Header.
Doc Pub user variables in a footer
Using variables and Word fields in a Footer.

The final output looks like this:

user variables output within a header

Footer Output User Variables

User Variables in Boilerplate

The variable tags can be placed within any boilerplate text. This allows for changes in data like the date or user publishing the document.

Boilerplate text and User variables
Boilerplate text with User Variables.
Two user variables within the Boilplate text
The User Name and Todays date within the Boilplate text.

User Variables in Title Text

A User Variable or a Paragraph Group tag can be used to set the Document Title. A variable is quicker but does not allow for parameters are used in a field tags.

Title Variables
$TemplateName User Variable

So the output looks like this:

Title Output

Or you can have the Title only output when you are generating a Formal Document. Use any of the $FormalDoc variables and they are only generated during a Formal Publish. In this example I have used $FormalDocTitle:

Title Formal Variables

Using $FormalDocTitle means the title will output as to the same as the User entered in the Title in the Publish Formal Document UI.

Publish Formal Document
Publish Formal Document User Interface
Title Formal Output
Document Title set by the words entered by a User during a Formal Publish.