ColumnNames (NotesView - JavaScript)

Read-only. The names of the columns in a view.

Defined in

NotesView

Syntax

getColumnNames() : java.util.Vector

Usage

Each vector element is a string.

The order of the column names in the vector corresponds to the order of the columns in the view, from left to right.

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";
		}
	}
}