Understand Template Status When Using Template Manager

From HotDocs Wiki

Jump to: navigation, search

Using Template Manager, you can manage both templates and components across an entire template set. As you do, Template Manager helps you determine the status of components used in your template set, particularly whether it's used correctly in the template and/or component file. This status is shown in the Status column of the component list. Following is a detailed description of how you can interpret this information.

When Template Manager initially analyzes all of the templates in the library, it builds a database of components and then determines how the components are used. Specifically, Template Manager reads through all the branches of logic (for example, variable fields, instructions (like INSERT and REPEAT), and so forth) and determines which components could possibly be referenced during assembly of that template. Components which exist in the component file and are actually used in a template are listed with the status of OK. Components which exist in the component file but are not used in any template are listed with a status of Unusedcomponent.gifUnused. And, components which are apparently used in the template but cannot be found in the component file, are listed as Badvariablereference.gifMissing. Template Manager reports these findings in the Status column of the component list.

However, there are different scenarios where this report may make you think the variable's status is being reported incorrectly, when, in reality, it is not. These include:

  • Template Manager listing like-named components, sometimes with different statuses.
  • Template Manager showing components that are used in unexpected templates.
  • Template Manager listing components as Used in some templates when they're really not Used.

A full description of each scenario follows.

Contents

Components That are Like-Named

Often, when looking at Template Manager, you'll see two or more instances of a given component in the component list. Each instance may look identical but

indicate a different status. For example:

     Client Name      Text Variable      OK
     Client Name      Text Variable      Unused

In this case, this means that two or more component files contain a Text variable named Client Name. In one template, Client Name is used, while in another template, it is not.

Additionally, some components may be listed multiple times and appear to be exactly the same:

     Client Name      Text Variable      OK
     Client Name      Text Variable      OK

In this situation, a variable with the same name and type exists in two or more component files, but there is some property of the variable that is different between the different copies of it. For example, Client Name in Template A may have an example format, while Client Name in Template B may not. Because their properties are different, they will be listed separately in the component list.

To help you determine which template or file uses which components, click on the component name in question. The file will be Focusarrow.gifmarked in the file list. You can also view the component's properties by double-clicking on the component. The Component Viewer appears where you can view its properties.

Components Used in Unexpected Templates

At times, it appears that a component is used in an unexpected, or even wrong, template. However, it is likely the component is instead used in a subtemplate (or INSERTed template) of the template in question.

To explain, when one template inserts another template, this creates a nested, branched view in the file list pane of Template Manager. To see the clearest picture of the relationship between components and the templates and/or component files to which they are related, expand this tree. To expand the tree, click the Expandview.gifExpand All button in the toolbar. Once expanded, you will see that the component isn't directly used in the parent template, but it is used in an inserted template.

Components Appearing as Used In Some Templates

Since multiple templates can share the same component file, a component in one template may have a status of OK, even though it isn't used in that particular template. This is because another template, which is pointed to the same component file, uses that variable.

Troubleshooting Status Reports

To summarize, if you encounter a situation in Template Manager where you feel a variable's status is being reported incorrectly, you can complete several tasks to determine the nature of the report:

  • Sort the component list by Component Name. When you see two components listed together, examine their properties to see which properties are different.
  • Examine the component in question—is there an Unused version and an OK version? If so, click on each version to see which files on the left are marked.
  • Expand all relevant entries in the file list so you can see all the templates, inserted templates, and component files.
  • If things still appear to be wrong, then determine how the component in question is being "used" in a template. For example, is it merged in the text of the template? Is it used by a computation, under circumstances that would cause it to be used? Is it merged in a prompt or additional text in the interview?

Finally, if it is plain that the component really is used, but you're certain Template Manager is displaying the incorrect status, then rebuild Template Manager database.

To regenerate the Template Manager database

  1. Close Template Manager.
  2. Locate the Template Manager database file associated with the HotDocs library you are managing. (This is the file located in the same folder as the HotDocs library (.HDL). It will have the same base file name as the library, but it will have a database file name extension (.MDB).
  3. Rename or delete this file.
  4. Run Template Manager again. (This re-analyzes all of the files and builds a new database.)
  5. Check the component status again, and see if the problem has corrected itself.


After rebuilding the Template Manager database, if the component status remains the same, the component is in actuality not being used—perhaps because the template is not automated correctly. However, if the component status changes, for example, its status changes from incorrect to correct, then this indicates a problem (possibly a bug) with the component database and/or Template Manager. If you feel you have discovered a bug, please contact Technical Support by calling (800)828-8328.