HotDocs Variable Dictionary Overview
A HotDocs Variable Dictionary is a file you create that describes a common set of variable names you can use when creating HotDocs variables. This is useful in ensuring consistent naming of HotDocs variables across your set of HotDocs templates.
For example, if you are creating multiple templates that should all use a set of client-specific variables (e.g. Client name, Client address), you would create a variable dictionary that contains entries for Client name and Client address. You will then be able to select these names in the HotDocs Field Editor when you create new variables in your templates.
Overview
The purpose of the Variable Dictionary is to suggest common variable names to template authors. This helps to ensure consistent naming across template sets edited by multiple template authors. Variable dictionaries do not restrict the variable names that template authors may use in a template; authors can still name variables however they want.
You create the variable dictionary file in a text editor, using the file format explained below. You then save the variable dictionary file to your Author workspace folder. When you edit templates in this workspace, you are then able to select common variable names when creating new variables using the Field Editor.
Common Tasks
Among others, the variable dictionary enables you to accomplish the following common tasks:
Workflow
When you begin a new HotDocs project, decide on the variable names that will be common across your template set. Create a new variable dictionary file that includes entries for these common variable names. After you create the workspace for your HotDocs project in Author, save the variable dictionary file to your new workspace folder. The common variable names then appear when you create new variables using the Field Editor.
Variable Dictionary File Format
The Variable Dictionary file contains entries for each common variable name you want to make available for use in your templates. For example, a variable dictionary file may look like:
"Name", "Type", "Notes"
"ClientName", "Text", "Name of client"
"ClientID", "Number", "Identification number of client"
"SigningDate", "Date", "Date of signing"
"IsClientCorporation", "True/False", "Is the client a corporation"
The first line of the file is always the required variable dictionary headings. Each subsequent line is an entry for a common variable name.
Variable dictionaries can be created using a text editor of your choosing. Your default text editor should be sufficient (e.g. Notepad). Once you define your common variable names, you must save your variable dictionary file as variabledictionary.hvd in your workspace folder.
You can specify a directory path for a variable dictionary on installation using custom install settings.
Common Variable Names
A Common Variable Name is an entry in a variable dictionary. For example:
"ClientName", "Text", "Name of client"
For each common variable name, you must provide the following information:
- Name — a unique variable name
- Type — one of the following HotDocs variable types:
- Text
- Number
- Date
- True/False
- Notes — a description of the variable's purpose
Using a Variable Dictionary
Once you have saved your variable dictionary to your workspace folder, open the workspace in Author and edit a template. When you create a new variable in the Field Editor, the dictionary variables will be displayed under Field Properties. The dictionary variable results will be filtered based on the type of variable you are creating. For example, if you select Number Variable, the field properties will only display a list of dictionary variables with the variable type "Number".
Template authors are not restricted to using these common variable names when creating new variables; authors can still name variables however they want.
If you make changes to your variable dictionary whilst your template is open for editing, those changes will not take effect in the Field Editor until you have closed and reopened your template.