getFirst (NotesViewNavigator - JavaScript™)
Returns the first entry in a view navigator.
Defined in
NotesViewNavigatorSyntax
getFirst() : NotesViewEntry
Return value | Description |
---|---|
NotesViewEntry |
The first 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 first-level category entries in a categorized view.var nav:NotesViewNavigator = database.getView("By category").createViewNav();
var entry:NotesViewEntry = nav.getFirst();
while (entry != null && !entry.isTotal()) {
requestScope.status += "\n" +
entry.getPosition(".") + " " +
entry.getColumnValues().firstElement().toString() + " has" +
entry.getDescendantCount().toFixed() + " total entries";
var tmpentry:NotesViewEntry = nav.getNextSibling(entry);
entry.recycle();
entry = tmpentry;
}