getNext (NotesViewNavigator - JavaScript)

Returns the next entry following the current or specified entry in a view navigator.

Defined in

NotesViewNavigator

Syntax

getNext() : NotesViewEntry

getNext(entry:NotesViewEntry) : NotesViewEntry

Parameter Description
entry An entry in the view. Cannot be null.
Return value Description
NotesViewEntry The entry following the current or specified entry. Returns null if there is no next entry.

Usage

This method moves the current pointer to the retrieved entry unless the return value is null.

Examples

This button gets all the entries in a view.
var v:NotesView = database.getView("By category");
var nav:NotesViewNavigator = v.createViewNav();
var entry:NotesViewEntry = nav.getFirst();
while (entry != null) {
	if (entry.isDocument()) {
		requestScope.status += "\n\t" +
		entry.getColumnValues().elementAt(1).toString();
	} else if (entry.isCategory()) {
		requestScope.status += "\n" +
		entry.getColumnValues().elementAt(0).toString();
	} else {
		requestScope.status += "\n" +
		entry.getColumnValues().elementAt(3).toFixed();
	}
	var tmpentry:NotesViewEntry = nav.getNext(entry);
	entry.recycle();
	entry = tmpentry;
}