Troubleshooting

Here we explain some of the most common issues reported on the issues list in the
Dictionary Editor
and
Markup Editor
.
Usage Check issues are classed as either serious (red stop sign), non-serious (amber triangle) or warnings (blue information icon).
Usage check page.
The list presents the issues in order of severity with the most serious errors at the top. The errors are further categorized by type, in bold text, to provide context as you scan through the list. The areas are as follows:
  • Brackets
    : misplaced or missing field or span brackets
  • Datatypes
    : incorrect datatype of parameters in used in an expression
  • Definition
    : issues found in properties of items in the Dictionary Editor
  • Logic
    : issues in the logic of the template
  • Repeats
    : issues related to usage of repeats
  • Setup
    : issues related to the setup of the template
  • Syntax
    : incorrect or missing characters in an expression
Clicking on the errors will navigate you to the position of the error in the template so you can easily troubleshoot.
Clicking into an issue that can be resolved through the Dictionary Editor will open the relevant Dictionary element for you to easily spot and resolve the issue.
Clicking into an issue that can be resolved through the Markup Editor will automatically open the Markup Editor.
The Issues section in the Markup Editor will show any Usage Check errors related to the current expression displayed, as well as additional troubleshooting information to help you resolve them.
Markup Editor displaying additional troubleshooting information.

Iterating through errors

It is a good idea to check the issues area often and deal with any errors before an upload. The best way to do this is to expand the footer and click on the first error displayed, correct the problem and then refresh the error list by clicking on the Usage Check icon before continuing onto the next error.
Occasionally, correcting one problem will cause other errors so therefore refreshing the list after solving each issue will ensure you catch all errors.
Iterate through these issues in the same way - take each one in turn and after fixing one problem, perform the Usage Check before going onto the next error.
When no issues have been found, a green tick will display.

Serious errors

The following are examples of serious errors, with tips on how to resolve them.
Types of Errors
Resolution
Setup.
Template reference not specified
This is classed as a serious error and you must fix before uploading or testing. Every Contract Express template must have a unique template name. To add a template name (or change an existing one), click on the template setup icon on the Contract Express tab in Microsoft Word:
Template setup icon.
Enter the name of the template in the "Template name" text box. Names can be made up of any Unicode characters including letters, numbers, underscores, spaces and special characters. The maximum length for a template name is 64 characters.
Setup.
This document is not using the DOCX file format.
This serious error is usually preceded by a warning dialog that you must save the file as a .docx format. Contract Express Author can only work with .docx files so save the file as the new Microsoft Word Format and then upload again.
Brackets
...
Serious errors related to brackets can occur when:
  • the brackets are mismatched,
  • a closing or opening bracket is missing,
  • a field contains field or span brackets, or
  • afield contains a paragraph marker or a span that covers multiple paragraphs has text or spaces before or after the brackets
Click on the issue in the issues list to highlight the problem area in the document.

Non-serious errors

The following are examples of errors that do not require resolution before uploading or testing your template.
Types of Errors
Resolution
Datatype
...
These errors occur when you have attempted to use a variable in a way that is prohibited because of its datatype. Often this may be a calculation (e.g. add a number to a text variable) either in a field in the document or as part of a computation variable.
Click on the issue in the issues list to either highlight the field in the document or open the Dictionary Editor to change the computation variable definition.
Definition.
Question variable '[variable name]' is not defined.
This is given when the variable type or prompt has not been confirmed.
Click on the issue in the issues list to be taken to the variable to add these attributes.
Logic.
This span condition is unnecessary. You could remove the span and keep its contents.
This warning message is given when a span condition is the same as its parent.
Click on the issue in the issues list to highlight the span in the document and investigate further.
You may find the outer select icon Outer select icon. (expand to parent span) to be useful in troubleshooting this error.
Logic.
This span condition will always evaluate to false. You could delete the entire span and everything within it.
This warning message is given when a span condition is in opposition to its parent.
For example you may nest a condition based on "Not CommencementDateKnown" inside a "CommencementDateKnown" span and it will never appear in the generated document.
Click on the issue in the issues list to highlight the span in the document and investigate further.
You may find the outer select icon Outer select icon. (expand to parent span) to be useful in troubleshooting this error.
Logic.
Variable 'ChildName' is controlled by 'ChildrenYN' but appears before it on the questionnaire. Consider moving 'ChildName' after 'ChildrenYN' in the questionnaire.
This warning is given when Contract Express identifies variables being asked out of order. For example, asking about ChildName before the question "Do you have Children?" would be asking questions out of order.
If you Test or Upload with variables out of order, the effect on the questionnaire is that ChildName will always be relevant even if you then say no to having children (relevancy is only enforced downwards on the questionnaire by default).
You should change the order in the questionnaire and ask the controlling variable first. See Organising the questionnaire into groups and pages.
Repeats.
Questionnaire group ‘[group name]’ in page ‘[page name]’ contains variables in different repetition nesting levels.
Each repeat context must be in its own questionnaire group. This warning is given if the group mentioned has variables on it whose repeat context differs. This could be because:
(i) you have the "How many?" (number) variable on the same group as the repeated questions, or
(ii) you have variables at different repeat levels on the same group.
For example, you might have repeated the CompanyName variable and inside that repeat have another repeat span for the DirectorName variable - yet put both the CompanyName and DirectorName variables in the same group.
It would be better to first collect the company names and in a different questionnaire group collect the DirectorName questions.
Repeats.
Variable ‘[variable name]’ is used in multiple repetition contexts.
This warning message is given when a variable is used in both a repeated and non-repeated way or when the context is different - e.g. you could be using Repeat NumberBorrowers at one point and then Repeat 1 elsewhere in the document.
To troubleshoot, find the variable in the dictionary and then use the forward and back arrows to find all the instances of this variable in the document and match up the repeat contexts.
If you find you sometimes need to repeat the variable and other times not repeat the variable, you may to make the repeat context a computation variable. For more on this see Variables in repeating spans.

Related content