getItemValueDouble (NotesDocument - JavaScript)

Returns the value of an item with a single numeric value.

Defined in

NotesDocument

Syntax

getItemValueDouble(name:string) : double
Parameter Description
name The name of the item.
Return value Description
double The value of the item.

Usage

If multiple items have the same name, this method returns the value of the first item.

If the item has no value or the value is text, date, or empty, this method returns 0.0.

If no item with the specified name exists, this method returns 0.0. It does not throw an exception. Use hasItem to verify the existence of an item.

If the item has multiple values, this method returns the first value.

Examples

This button gets the value of a numeric item in the current document as a double.
var itemname:string = "distance";
var doc:NotesDocument = currentDocument.getDocument();
if (doc.hasItem(itemname)) {
	var itemvalue:double = doc.getItemValueDouble(itemname);
	requestScope.status = itemvalue.toFixed();
}