HotDocs Developer Help File
2. Click the Field Map tab. The window changes to show the fields in the table as
well as the variables in the template.
3. In the Linked Variable column, click the drop-down button that corresponds to the
database field to which you want to link.
4. Select the variable.
5. Optionally, to show both linked and unlinked variables in the Linked Variable
drop-down lists, clear Show unlinked variables only. Be aware, however, that if
you select a variable that is already linked, HotDocs will unlink it in order to link it
to the new field. Each variable in the template can be linked to only one field at a
time. (In these lists, HotDocs uses brackets to show the variable is linked, for
example, [Employee Name].)
6. Repeat this process for every variable that can be answered using data from the
In order for HotDocs to remember which records your users have selected during
assembly, you must assign a key field. For information on doing this, see
Remember Selected Records.
In HotDocs, NULL values retrieved from a database are considered unanswered
while empty string values ("") are considered answered, but empty.
When HotDocs queries the database, it retrieves every record from the table,
displays them for the user, and then disconnects from the database. Because of
this, you should use a filter on your database component to minimize the number
of records that are initially retrieved. (If filtering is not an option but you still want to
avoid retrieving all records at once, you can click the Options tab of the Database
Editor and clear Use disconnected (client) record set. Be aware, however, that
clearing this option can impact the speed with which the user can scroll through
and filter large data sets. It also prohibits the user from sorting the data.) (See
Choose a Database Cursor for more details.)
Remember Selected Records
During assembly, when HotDocs connects to a database, it displays a table of records.
Once a user selects a record and moves to another dialog, HotDocs can remember from
where in the database table the record was selected so that if the user revisits the table
during the interview, the user can see his or her selection.
For HotDocs to operate this way, you must make one of the fields in the database
component the key field. A key field contains information that is unique to a record—for
example, an invoice number or a customer identification number. Without a key field,
HotDocs has no way to remember from where in the table the record was retrieved and
therefore, cannot retain this information once the user moves to a new dialog. This may
be confusing to a user who reviews a database record selection—even though answers
may appear in the assembled document, the interview shows that no record has been