computeWithForm (Document - Java)

Validates a document by executing the default value, translation, and validation formulas, if any are defined in the document form.

Defined in



public boolean computeWithForm(boolean dodatatypes, boolean raiseerror)
    throws NotesException


boolean dodatatypes

The method ignores this parameter. Specify either true or false.

boolean raiseerror

If true, an error is raised if the validation fails. If false, no error is raised; instead, the method returns false if validation fails.

Return value

  • true if there are no errors in the document
  • false if there are errors in the document


The form is as follows:

  1. The form stored in the document, if any.
  2. The value of the Form item, if no form is stored in the document.
  3. The database default form, if the document does not have a Form item.

In the user interface, you must use a form to create a document. The document must meet the form requirements for input validation, and the user interface informs you if the document does not meet these requirements. Programatically you can create a document without a form. The computeWithForm method provides a means of checking that the data you placed in a document meets the requirements of a form, although (unlike in the user interface) you can still save a document if computeWithForm returns false or throws an exception.