Standard Document/Notification Template Merge Field List

Document Templates and Notification Templates make available a standard set of datasources used to select and insert merge fields into a template. The standard datasources are listed below.

This table lists all of the standard notification template fields for view-based data sources. The loop icon image-20240808-140630.png indicates that the insertable field is a group that contains multiple fields within it; in such cases, the group field will require a loop to display the data in the included fields. For more information, see Using Loops in Document Templates.

*Note- the info above is static and may become outdated over time. For most current info on fields available in each data source:

DECLARE @DocTemplateFields TABLE
(
DOC_TMPL_DATASRC_ID VARCHAR(255), DATASRC_NAME VARCHAR(255), DATASRC_DESCR VARCHAR(255), REF_FUNC_AREA_CODE VARCHAR(255), SQL_VIEW VARCHAR(255), ORDINAL_POSITION int, COLUMN_NAME VARCHAR(255), DATA_TYPE VARCHAR(255), CHARACTER_MAXIMUM_LENGTH INT, IS_NULLABLE VARCHAR(3)
)
DECLARE
@DOC_TMPL_DATASRC_ID VARCHAR(255), @DATASRC_NAME VARCHAR(255), @DATASRC_DESCR VARCHAR(255), @REF_FUNC_AREA_CODE VARCHAR(255), @SQL_STMTS VARCHAR(255);
declare curs cursor for
select DOC_TMPL_DATASRC_ID, DATASRC_NAME, DATASRC_DESCR, REF_FUNC_AREA_CODE, SQL_STMTS
from DOC_TMPL_DATASRC src
join APP_DYN_SVC svc
on svc.APP_DYN_SVC_ID = src.APP_DYN_SVC_ID
where SQL_STMTS LIKE 'VW%'
order by DATASRC_NAME
open curs
FETCH NEXT FROM curs INTO @DOC_TMPL_DATASRC_ID, @DATASRC_NAME, @DATASRC_DESCR, @REF_FUNC_AREA_CODE, @SQL_STMTS
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT INTO @DocTemplateFields
(
DOC_TMPL_DATASRC_ID,
DATASRC_NAME,
DATASRC_DESCR,
REF_FUNC_AREA_CODE,
SQL_VIEW,
ORDINAL_POSITION,
COLUMN_NAME,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH,
IS_NULLABLE
)
SELECT
@DOC_TMPL_DATASRC_ID,
@DATASRC_NAME,
@DATASRC_DESCR,
@REF_FUNC_AREA_CODE,
@SQL_STMTS,
ORDINAL_POSITION,
COLUMN_NAME,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH,
IS_NULLABLE
FROM INFORMATION_SCHEMA.COLUMNS
where table_name = @SQL_STMTS

-- area of interest
and @REF_FUNC_AREA_CODE = 'PERMIT'

FETCH NEXT FROM curs INTO @DOC_TMPL_DATASRC_ID, @DATASRC_NAME, @DATASRC_DESCR, @REF_FUNC_AREA_CODE, @SQL_STMTS
END
SELECT * FROM @DocTemplateFields;
CLOSE curs;
DEALLOCATE curs;

Common Merge Fields

All document and notification data sources allow for the insertion of the following standard set of fields:

currentUser Merge Fields

NOTE: Do not use currentUser merge fields for notification templates. They are currently only active for document templates.

Insertable Field Name

Description

Insertable Field Name

Description

id

Current user's internal user identifier (not recommended to be used).

defaultDistrict

Current user's default district name, as specified by an administrator.

defaultProgram

Current user's default program area, as specified by an administrator.

displayName

Current user's full name as shown for display.

email

Current user's email address.

firstName

Current user's first name.

lastName

Current user's last name.

phone

Current user's phone number.

phoneExt

Current user's phone number extension.

title

Current user's title.

environmentSettings Merge Fields

Insertable Field Name

Description

Insertable Field Name

Description

agencyAcronym

The agency initials.

agencyFullName

Full name of the agency.

applicationUrl

The full URL to the application. For environments where there exist separate web sites for internal and external users, the correct URL will be returned depending on whether the user (that is, the user generating the document for document templates, or receiving the email for notification templates) is an internal or external account holder. 

isProduction

Indicates whether or not the document/notification is being generated from a test or production instance of the system.

productName

The name given to the nVIRO system by the agency (e.g., "ePermitting").



Related pages