getColumnValues (NotesView - JavaScript)

Gets the value of each row in a column.

Defined in

NotesView

Syntax

getColumnValues(n:int) : java.util.Vector
Parameter Description
n A column number where columns are numbered left to right starting with 0.
Return value Description
java.util.Vector The values in the specified column.

Usage

A column value is not returned if it is determined by:
  • A formula containing a UI-only function such as @IsExpandable or @DocNumber.
  • A constant.
  • A corresponding field does not contain a value.

An exception occurs in these cases.

Examples

This button gets all column values in a view.
var v:NotesView = database.getView("main");
var names:java.util.Vector = v.getColumnNames();
for (var i = 0; i < v.getEntryCount(); i++) {
	// for every row in the view
	requestScope.status += "\n";
	for (var j = 0; j < v.getColumnCount(); j++) {
		// for every column in the row
		try {
			// get the column value for that row
			var values:java.util.Vector = v.getColumnValues(j);
			requestScope.status += "\t" +
			names.elementAt(j) + "=" + values.elementAt(i);
		} catch(ee) {
			// in case the column value is invalid
			requestScope.status += "\t" +
			names.elementAt(j) + "= unknown";
		}
	}
}