Formula Language Keywords

As with any programming language, Formula Language includes a number of reserved keywords that have special meanings. These keywords are used to perform special functions and cannot be used as variables. For example, the following table describes the current list of Formula Language reserved keywords.




Used to define the initial or default value for a field. For example, let's say you have a field called Status. Using the following formula, the field will be set to a value of "New Request" when the document is created. This field will continue to hold this value until either the user or the Notes application changes the value. After the stored value is changed and the document is saved, the new value will be stored in the field.

DEFAULT Status := "New Request"; Status


Used to assign a value to an environment setting in the user's NOTES.INI file. For example, let's say you have a database to request helpdesk support. Using the environment keyword, you could capture and store the employee's serial number in the NOTES.INI file the first time an employee submits a service request. As new requests are submitted, the database could query for the existence of the field and automatically fill in the EmpNum field with the employee's serial number. If the environment variable does not already exist in the INI file, Notes will create the variable and assign it a value. Otherwise, if the variable already exists, Notes will assign the new value.

ENVIRONMENT EmpNum := "123456";

Note: The @Environment function can also be used to retrieve (or set) an environment variable setting.


Used to assign a value to a field on a document or form. If the field exists, the new value will be assigned. If the field does not exist, the field will be created and assigned the value. For example, the following assigns the current date to a field called theDate.

FIELD theDate := @Today;


Used to add comments to a formula. Comments must be enclosed in quotes or braces and terminated with a semicolon (if part of a multi-line formula). For example:

REM "This is a comment.";
REM {This is a comment};


Used to determine the selection criteria for a view, agent, or replication formula. All documents that match the selection formula will be included in the view, agent, or replication formula. For example, let's say you have a Notes database with multiple forms. To create a view that only displays one of the forms, you would define a selection formula similar to the following:

SELECT form = "ServiceRequest";

By default, reserved words are always the first word in a statement. Reserved words may be entered in lower, upper, or mixed case. However, Designer will automatically convert lower or mixed case words to uppercase when the formula is saved.

An Introduction to the Lotus Domino Tool Suite

Getting Started with Designer

Navigating the Domino Designer Workspace

Domino Design Elements

An Introduction to Formula Language

An Introduction to LotusScript

Fundamentals of a Notes Application

Calendar Applications

Collaborative Applications

Reference Library Applications

Workflow Applications

Web Applications

Design Enhancements Using LotusScript

Design Enhancements Using Formula Language

View Enhancements

Sample Agents

Miscellaneous Enhancements and Tips for Domino Databases

Data Management


Application Deployment and Maintenance


Appendix A. Online Project Files and Sample Applications

Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?

Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott © 2008-2020.
If you may any questions please contact us: