IndentLevel (NotesViewEntry - JavaScript)

Read-only. The indent level of a view entry within the view.

Defined in

NotesViewEntry

Syntax

getIndentLevel() : int

Usage

The indent level corresponds to the number of levels in the position. Position 1 is indent level 0, position 1.1 is indent level 1, position 1.1.1 is indent level 2, and so on.

Examples

This button gets values for the entries in a view and indents them according to their indent level. For level 0, the first column value is used. For other levels, the second column value is used.
var nav:NotesViewNavigator = database.getView("By category").createViewNav();
var entry:NotesViewEntry = nav.getFirst();
while (entry != null) {
	var tabs:string = "";
	for (var i:int = 0; i < entry.getIndentLevel(); i++) {
		tabs = tabs + "\t";
	}
	var element:string = entry.getIndentLevel() == 0 ?
		entry.getColumnValues().firstElement().toString() :
		entry.getColumnValues().elementAt(1);
	requestScope.status += "\n" + tabs + element;
	var tmpentry:NotesViewEntry = nav.getNext(entry);
	entry.recycle();
	entry = tmpentry;
}