getItemValueArray (NotesXspDocument - JavaScript)

Gets the value of an item as an array.

Syntax

getItemValueArray(name:string) : Array
Parameter Description
name The name of the item.
Return value Description
Array An array of item values. Data types depend on the data type of the item.

Usage

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

If the item does not exist, this method returns an array with a length of 0.

This method returns all values of the item.

Examples

This data binding for a multiline edit box returns the values of the Numbers item in the document associated with the current XPage.
var array = document1.getItemValueArray("Numbers");
if (array.length == 0) {
	return "Numbers is empty or doesn't exist";
} else {
	var result = "";
	for (var i=0; i<array.length; i++) {
		result = result + array[i].toFixed() + "\n";
	}
	return result;
}