gotoParent (NotesViewNavigator - JavaScript)

Moves the current pointer to the parent entry of the current or specified entry in a view navigator.

Defined in

NotesViewNavigator

Syntax

gotoParent() : boolean

gotoParent(entry:NotesViewEntry) : boolean

Parameter Description
entry An entry in the view. Cannot be null.
Return value Description
boolean
  • true if the operation succeeds
  • false if there is no parent entry

Examples

This button gets all the first-level category entries in a categorized view in reverse order.
var nav:NotesViewNavigator = database.getView("By category").createViewNav();
var entry:NotesViewEntry = nav.getLast();
do {
	entry = nav.getCurrent();
} while (nav.gotoParent());
while (entry != null) {
	if (!entry.isTotal()) {
		requestScope.status += "\n" +
		entry.getPosition(".") + " " +
		entry.getColumnValues().firstElement().toString() + " has" +
		entry.getDescendantCount().toFixed() + " total entries";
	}
	var tmpentry:NotesViewEntry = nav.getPrevSibling(entry);
	entry.recycle();
	entry = tmpentry;
}