evaluate (Session - Java)

Evaluates a Domino® formula.

Defined in



public java.util.Vector evaluate(String formula)
    throws NotesException
public java.util.Vector evaluate(String formula, Document doc)
    throws NotesException


String formula

The formula.

Document doc

The formula context. Cannot be null.

Return value


The result of the evaluation. A scalar result is returned in firstElement.


If the formula contains the name of a field, you must use the 2-parameter method. The formula takes the field from the document specified as parameter 2.

@Functions that affect the user interface do not work in evaluate. These include: @Command, @DbManager, @DbName, @DbTitle, @DDEExecute, @DDEInitiate, @DDEPoke, @DDETerminate, @DialogBox, @PickList, @PostedCommand, @Prompt, and @ViewTitle.

You cannot change a document with evaluate; you can only get a result. To change a document, write the result to the document with a method such as Document.replaceItemValue.