FORMULA LANGUAGE


Run-time errors
Example

Run-time errors occur when the formula runs. These errors can be categorized as follows:


The following @functions help you deal with run-time errors:
Notes generates an error for a field if the built-in validation checking fails. For example, if you specify a field as numeric and the user enters a non-numeric value, Lotus Domino makes the value of the field an error. You can generate an error for a field by setting its value to @Error.

Notes reports errors in fields when the user attempts to save the document. For example, if a numeric field contains a non-numeric value, Lotus Domino generates the message "Cannot convert text to a number" when the user attempts to save a document.

To change the message or perform another action when an error occurs, test the field for an error with @IsError in the field validation formula. You can generate your own error message with @Failure, but only in field validation formulas.

To incorporate your own error conditions for a field, return @Error if you detect an error condition.

Outside field formulas, for example, in an agent, button, or hotspot, you can check the contents of a field and react immediately to an error condition. For example, if you check a field with a button, you can change the field value or report the error before the user attempts to save the document. In checking for errors, be aware that the built-in validation checking generates an error as soon as the user enters a value in a field, but that a translation formula using @Error does not generate an error until the user attempts to save the document.

Example
See Also