getItemValueDouble (NotesXspDocument - JavaScript™)
Gets the value of an item as a double.
Syntax
getItemValueDouble(name:string) : double
Parameter | Description |
---|---|
name |
The name of the item. |
Return value | Description |
---|---|
double |
The item value. |
Usage
If multiple items have the same name, this method returns the value of the first item.If the item has multiple values, this method returns the first value.
If the item does not exist, this method returns 0.0.
If the item is text or a date, this method returns 0.0.
Examples
This value for a computed field returns the value of the Number item in the document associated with the current XPage.var n = document1.getItemValueDouble("Number");
if(n == 0.0) {
return "Number is empty or doesn't exist."
} else {
return n;
}