Code and comment template variables

When you create code and comment templates, you can insert variables that are resolved dynamically at runtime. You can use a variety of date/time, application, object name, and author variables.


Template variables take the following form: ${variable_name}.

Template variables

The current Notes user name; for example, John Smith/ABC/Company
The current date.
The name of the database; for example, "names.nsf"
The title of the database; for example, "Name And Address Book"
The name of the design element; MyScriptLib
The type of the design element; for example, Agent
The name of the code element being created; for example, mySub
The return type for Function and "Property Get" code elements. In the actual comment or code, this will be blank if no return type is specified in the declaration. It is always blank for other code element types.
The type of code element being created: Library, Agent, Sub, Function, Property Get, Property Set, Class, or Type. Library is the default preview value.
The current time.
The current OS user name; for example, jsmith
The current year.
In the Comment Template dialog, you can preview some template variables by checking Preview or by using content assist hover help as you type them.


Here is an example of a comment template that uses template variables:
    Application: ${application}
    Author: ${author}
    Created: ${date} ${time}
Note: If you want to include a string of the form ${something} in your template and not have it replaced with a template variable, prefix the string with $; for example, $${something}.