Number Variable Overview

A number variable is a type of variable that represents an unknown number value. For example, if you want to ask a template user for a loan amount, you would create a number variable in your template to capture that specific item of data.

In this topic Hide

  1. Overview
  2. Common Tasks
  3. Workflow
  4. Number Variable Properties
  5. When to Use Number Variables
  6. Number Variables and Formats
  7. Common Reference Topics

Overview

In HotDocs, a number variable is a component that represents unknown numerical content in your template (i.e. a number value, such as currency, decimal number, or other amount that can be calculated). You can create number variables using the HotDocs Field Editor or Component Studio and number variables are typically:

Like other components, number variables have properties that you can set to define how they perform in an interview and how HotDocs processes the number variable in an assembled document. In fact, number variables have a number of unique properties, which you can review below.

Common Tasks

Among others, number variables enable you to accomplish the following common tasks:

Workflow

When you create a template from an existing document, the existing document usually contains placeholders for the numerical content that is unknown. To enable template users to provide the unknown numerical content, you:

When creating a number variable, you can set properties that define how to gather an unknown number value from a template user, how HotDocs stores that number value as an answer, and how to format that answer when assembling a document. For example, you start by setting the name property for the number variable, which is used to identify the number variable throughout Author and in the answer file. You can set the Prompt property to provide instructive text (as opposed to the number variable name) to help a template user answer a question during the interview. You can set the Default format property to define the pattern that HotDocs uses to format the template user's answer in the assembled document (such as a whether or not to include commas in the number). Lastly, you can then group related number (and other) variables into dialogs to improve the usability and flow of an interview.

Once you have created the number variable and set all of the properties you need, you can use the test feature to ensure the variable will behave as you desire when the document is assembled.

Number Variable Properties

Like all variables, number variables have properties you can use to edit how the number variable appears in an interview, how the number variable is processed during assembly, etc. In addition to the properties common to all variables, number variables have the following unique properties:

When to Use Number Variables

To better understand when to use a number variable (as opposed to the other types of variables), consider the following:

Number Variables and Formats

When working with number variables, there are times when you may want to control how a template user's answer to an interview question is displayed in an assembled document. For example, you may want currency amounts entered with commas (e.g. 9,999) to appear in the assembled document without commas (e.g. 9999) or spelled out in full (e.g. Nine Thousand Nine Hundred and Ninety-Nine). HotDocs enables you to make such modifications to answers based on number variables using number formats. To assist you in using number formats, HotDocs provides a set of commonly used number formats (such as formats that enable you to use round to the nearest whole number, remove zeros entered, and more) when you install Author.

You can either format a single instance of the placeholder field that references the variable, or you can format every placeholder field that references that variable throughout the template. You can also create your own custom format, should you need a format not included in the commonly used formats.

For more information on formats, you can read the Formats Overview and the Formatting an Answer document for more information.

Common Reference Topics

Among others, the following reference topics may relate to this conceptual area: