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.
Syntax
Template variables take the following form: ${variable_name}.Template variables
- ${author}
- The current Notes user name; for example, "John Smith/ABC/Company"
- ${date}
- The current date.
- ${db_name}
- The name of the database; for example, "names.nsf"
- ${db_title}
- The title of the database; for example, "Name And Address Book"
- ${designelement_name}
- The name of the design element; "MyScriptLib"
- ${designelement_type}
- The type of the design element; for example, "Agent"
- ${element_name}
- The name of the code element being created; for example, "mySub"
- ${element_returntype}
- 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.
- ${element_type}
- The type of code element being created: "Library", "Agent", "Sub", "Function", "Property Get", "Property Set", "Class", or "Type". "Library" is the default preview value.
- ${time}
- The current time.
- ${user}
- The current OS user name; for example, "jsmith"
- ${year}
- The current year.
Sample
Here is an example of a comment template that uses template variables:%REM Application: ${application} Author: ${author} Created: ${date} ${time} %END REM
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}
.