A generated document from a sub-template can be included within the generated document for a super-template by a field of the general form:
Include Template
template-name
With
variable-1
As
expression-1, ..., variable-K
As
expression-K
}
where the
With
component is optional.
Such fields must cover a complete Word paragraph. It is considered a serious structural error if they do not, preventing publication of the template.
Variables used in the sub-template contribute to relevance in the overall questionnaire as though the body of the sub-template occurred at the location of the Include field in the super-template, as it will do in any generated document.
{ Include Template 'Termination Clause' }.
Let's imagine a company has a standard Termination clause and would like to use this in all their documents to ensure consistency. They would like to maintain this clause separately so that any updates to the clause are always added to their generated documents. To do this, they would create a separate template, and place their Termination Clause in here. Any updates to this clause can be changed in just this one place. In their templates they would add an Include field at the place where they would want the Termination clause to appear in the generated document:
{Include Template TERMINATION_CLAUSE}
The template has now become a super-template and the Termination clause is its sub-template. The most up to date version of the Termination Clause will be brought into the generated document wherever the Include field is placed.
In this example, the company has standard clauses for each type of law they practice in. They need the appropriate LAW sub-template to be included in their generated documents, depending upon the answer to the Jurisdiction question. They start by adding the Include fields into the document for each of the sub-templates they have. Then by adding a span around the Include field they can make these fields conditional based on the Jurisdiction variable:
[
Jurisdiction Is "USA"
{Template USA_LAW}]
[
Jurisdiction Is "Europe"
{Include Template EUROPE_LAW}]
[
Jurisdiction IsNot "USA" and Jurisdiction IsNot "Europe"
{Include Template REST_OF_WORLD_LAW}]
In this example the LAW sub-template has been amalgamated into one template with conditional paragraphs for each of the types of law practiced. This time the single LAW sub-template is included using the With component of the Include field. To set this up, the sub-template will have Business Rules such as Jurisdiction Is "
USA
", Jurisdiction Is "
EUROPE
" and Jurisdiction Is "
ROW
" on the relevant clauses where Jurisdiction Is a Text Selection variable inside the sub-template. The Include With field in the super-template would set the values of the Jurisdiction text selection variable in the sub-document by passing the answer to the Jurisdiction question from the super-template. It would look something like this:
{Include Template LAW With Jurisdiction As Jurisdiction}
Here for a different company, who have a similar LAW sub-template the different variable definitions are based not on the
Jurisdiction
but on the location of the
SalesOffice:
{Include Template LAW With Jurisdiction As SalesOffice}
This allows them to base more than one SalesOffice in one regional area.
In our 4th example, the SIGNATURE sub-template is placed inside a repeat statement, meaning that it will be included repeatedly for each of the parties to the agreement. SignatureName will be a question variable in the sub-temple used within a field and it is being set by a variable called PartyName:
[
Repeat NumberOfParties
{Include Template SIGNATURE With SignatureName As PartyName}]
Note that such parameter assignments do not work with active text, therefore such variables should not be used as question prompts. This is because questionnaire prompts are consolidated into the dictionary independently of parameter assignments. A variable can have multiple parameter assignments in the same template suite, but it must be uniquely defined for the questionnaire display.