ColumnCount (NotesView - JavaScript™)
Read-only. The number of columns in a view.
Defined in
NotesViewSyntax
getColumnCount() : int
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";
}
}
}