getPrevCategory (NotesViewNavigator - JavaScript™)
Returns the previous category entry in a view navigator.
Defined in
NotesViewNavigatorSyntax
getPrevCategory() : NotesViewEntry
Return value | Description |
---|---|
NotesViewEntry |
The category entry preceding the current entry. Returns null if there is no previous category entry. |
Usage
This method moves the current pointer to the retrieved entry unless the return value is null.Examples
This button gets all the category entries in a view in reverse order.var v:NotesView = database.getView("By category and date");
var nav:NotesViewNavigator = v.createViewNav();
var entry:NotesViewEntry = nav.getLast();
if (entry != null) entry = nav.getPrevCategory();
while (entry != null) {
var tabs:string = "";
for (var i=0; i<entry.getIndentLevel(); i++) tabs = tabs + "\t";
requestScope.status += "\n" + tabs +
entry.getColumnValues().elementAt(entry.getIndentLevel()).toString();
var tmpentry:NotesViewEntry = nav.getPrevCategory();
entry.recycle();
entry = tmpentry;
}