Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

This section provides details on how to view, edit, and configure document template metadata and content. Document template contents are edited using the AceOffix editor.

Editing Document Template Metadata

To edit template metadata:

  1. Navigate to Admin > Document Templates

are Microsoft Word-based documents used to merge data from specific functional areas, such as permits, evaluations, and compliance actions. Document templates are used to create letters, permits, inspection reports, or just about any other document. For more information on how to edit and format documents using Microsoft Word, visit the Microsoft Word Help Center.

In order to use the Document Template editor, the AceOffix browser plugin must be installed on the client desktop browser. In addition, Microsoft Office must also be installed on the client computer.

To edit document templates, navigate to Admin > Document Templates. This page displays a list of existing document templates. To edit a template, click the corresponding Open button. Or, to create a new template, click the Add New Document Template button. In either case, a page opens, allowing you to configure the document template. To view an existing document template with data merged in from the database, click Preview. To edit an existing document template, click Edit. If either Preview or Edit is clicked, an AceOffix window opens (as the New Document Template or Edit Document Template page).

Info

Note that, when editing or viewing a document template in the AceOffix window, a popup window will be displayed over the main nVIRO page, indicating that AceOffix is open in another window. 

Editing a Document Template Using AceOffix

The AceOffix window contains the Editor section, which displays the document itself as an editable Word document, along with a list of merge fields available for insertion into the document. These merge fields appear to the left of the document, under the heading Insertable Fields.

Image Removed

Editing a document template is the same as editing a document in Microsoft Word; the only difference is that the document template contains the insertable fields, which act as placeholders for values that will change dynamically based on the data from the database, such as permit, site, or inspection information.

Insertable Fields Type

There are two types of fields: single insertable fields (non-bold) and Looping insertable fields (bold). These fields can be filtered at the top of the fields list by adding text in the fillable field, resulting in predictive results:

Single Insertable Fields

Listed in a non-bold typeface. To insert a field in the document, double click on any non-bold insertable fields from the list and a text will be inserted in the document (at the location of the cursor) in the form ofimage-20240202-190454.pngImage Removed
Code Block
languagetext
<<[FieldName]>>

 this field will be changed to its corresponding value when previewing or generating the document. 

Image Removed 

Looping Insertable Fields

Which is listed as a bold insertable field in the list. The bold insertable field groups multiple fields that represent a table of values. For example, a site usually has multiple contacts associated with it. To insert all contacts in a document, double click contacts, and a text will be inserted in the document (at the location of cursor) in the form of 

Code Block
languagetext
<<foreach [contact in contacts]>> <</foreach>>

 which will loop through all contacts available for that document. For more details on loops visit Using Loops in Document Templates.

Image Removed

To display the items available within a bold insertable field, single-click on any bold insertable fields, which will display the available fields.

Image Removed

For more details on how to use loops in a document check Using Loops in Document Templates.

Document Template Possibilities

The Document Template tool
  1. .

  2. Click Open next to an existing template or select Add New Document Template to create a new one.

The document template metadata editor page is displayed.

image-20250217-163241.pngImage Added

Configurable Fields on the Document Template Page

The following key fields are available when configuring a document template:

Field

Description

Template Name

The name of the document template.

Template Description

An internal description of the template.

Security Classification

Defines visibility (Public, Internal, Authorized Users).

Functional Area

Specifies the category of the document (Permit, Compliance Action, etc.).

Document Category

Groups templates based on predefined categories.

Program Area

Determines applicable programs for the template. This value is derived from the selected Document Category.

Base Datasource

Defines the merge field list available for the template.

Dynamic Datasources

Specifies the forms and reports whose fields can be merged.

The available forms depend on the document template's functional area:

  • For document templates in the application/request, complaint/incident, or schedule functional areas, submission forms within those functional areas and permit, submission, and site program component forms can be selected.

  • For document templates in the permit functional area, application/request forms and permit, submission, and site program component forms can be selected.

  • For document templates in the site functional area, application/request forms and program component forms from any functional area can be selected.

  • For document templates in the compliance action functional area, compliance action and site program component forms can be selected.

  • For document templates in the evaluation functional area, evaluation and site program component forms can be selected.

  • For document templates in the project functional area, project and site program component forms can be selected.

  • For document templates in the receivable functional area, permit program component forms can be selected.

Right Sidebar

Active/Inactive

Controls whether the template is available for use.

When saving changes to an active document template in a production environment, a dialog box that prompts the user to provide a description of the edits made.

Allow multiple documents to be finalized

If unchecked, only one generated document based on this template is allowed for a given entity.

Auto-create event upon finalization

If checked, an event will be created with the Event Type "Document Generated" when a document is generated using this template.

Allow security classification changes

When checked, the security classification of documents generated from this template may be changed. When unchecked, documents that have been generated from this template cannot have their security classification changed. 

Allow file name changes

If checked, users will be given the option to type a name for the generated document before it is generated. If unchecked, the name of the generated document will be the same as the template name.

Prefix Generated File Name with Record Identifier

Prefixes the generated document name with the current record’s business identifier (e.g. Permit Number, Compliance Action Number, Site Number, etc).

View History

Displays metadata changes over time.

Previewing a Document with Merged Data

Clicking Preview opens a read-only version of the document with actual data merged from the selected source.

Editing Document Template Content using AceOffix

To edit template content:

  1. Navigate to Admin > Document Templates.

  2. Click Open next to an existing template or select Add New Document Template to create a new one.

  3. Click Edit to modify the document content.

  4. The template opens in an AceOffix window, displaying the document as an editable Word file along with a list of available merge fields.

When the AceOffix editor is open, a popup window will indicate that AceOffix is running separately from the main application.

Image Added

Insertable Fields

Templates contain insertable fields that dynamically merge data from the system:

  • Single Insertable Fields: Appear in non-bold text and are inserted as placeholders (e.g., <<[FieldName]>>).

  • Looping Insertable Fields: Appear in bold text and represent repeating data structures (e.g., a list of contacts). These use <<foreach [item in items]>> … <</foreach>> syntax.

The available fields are driven by the selected datasources on the document template metadata page (see above).

To insert a field:

  • Double-click a non-bold field to insert it at the cursor location.

  • Double-click a bold field to insert a loop structure.

  • Click a bold field once to display its available subfields.

For more information on looping and advanced syntax, see Using Loops in Document Templates.

Variables, Formulas, Formatting Content and Controlling Logic

The Document Template editor is a powerful tool that can regenerate complicated documents based on logic and data sources. It can also perform data manipulation and calculations. Some of the codes that could be used in a document template can be found at Document Template Syntax Guide page.

Standard Document/Notification Template Fields

See page Standard Document/Notification Template Merge Field List for a list of standard merge fields.

On this page

Table of Contents


Related Content