getLastDocument (NotesViewNavigator - JavaScript™)
Returns the last document entry in a view navigator, skipping any category and totals entries.
Defined in
NotesViewNavigatorSyntax
getLastDocument() : NotesViewEntry
Return value | Description |
---|---|
NotesViewEntry |
The last document entry. Returns null if there are no entries. |
Usage
This method moves the current pointer to the retrieved entry unless the return value is null.Examples
This button gets all the document entries in a view in reverse order.var v:NotesView = database.getView("By category");
var nav:NotesViewNavigator = v.createViewNav();
var entry:NotesViewEntry = nav.getLastDocument();
while (entry != null) {
requestScope.status += "\n" +
entry.getColumnValues().elementAt(1).toString();
var tmpentry:NotesViewEntry = nav.getPrevDocument();
entry.recycle();
entry = tmpentry;
}