createViewNavFromAllUnread (NotesView - JavaScript™)
Creates a view navigator for all unread entries in a view.
Defined in
NotesViewSyntax
createViewNavFromAllUnread()
: NotesViewNavigator
createViewNavFromAllUnread(username:string) : NotesViewNavigator
Parameter | Description |
---|---|
username |
If present the method returns a NotesViewNavigator containing all unread documents on behalf of the given name. If omitted the method returns a NotesViewNavigator containing all unread documents on behalf of the current user ID. |
Return value | Description |
---|---|
NotesViewNavigator |
The new view navigator. |
Usage
The navigator contains all entries even if the view is filtered for a full-text search. If the database does not track unread marks, all documents are considered read.Examples
This button gets all the entries in a view for documents unread by the current user.var v:NotesView = database.getView("main");
var nav:NotesViewNavigator = v.createViewNavFromAllUnread();
if (nav.getCount() == 0) {
requestScope.status = "No unread documents";
return;
}
var entry:NotesViewEntry = nav.getFirst();
while (entry != null) {
requestScope.status += "\n" +
entry.getColumnValues().elementAt(0);
var tmpentry = nav.getNext();
entry.recycle();
entry = tmpentry;
}