TopLevelEntryCount (NotesView - JavaScript™)
Read-only. The number of top-level entries in a view.
Defined in
NotesViewSyntax
getTopLevelEntryCount() : int
Usage
If the view is categorized, this count is the number of main categories.If the view has totals, this count includes the grand total.
Where the count may exceed 32767, add 65536 if the count is negative. A count exceeding 65535 gives a bogus result and no exception occurs. The second example shows another technique for getting the top-level entry count that assures a correct result and also subtracts the a total entry if present.
Examples
This computed field displays the number of top-level entries in a view associated with the page, allowing for a count exceeding 32767 but not 65535.var tlec:int = view1.getTopLevelEntryCount();
return (tlec < 0 ? tlec + 65536 : tlec).toFixed();
This
computed field displays the number of top-level entries in a view
associated with the page, allowing for a count exceeding 65536 and
subtracting a total if present.
var nav:NotesViewNavigator = view1.createViewNav();
var entry:NotesViewEntry = nav.getLast();
var tlecs:string = entry.getPosition(".");
tlec = tlecs.indexOf(".") == -1 ? tlecs : tlecs.substring(0, tlecs.indexOf("."));
return entry.isTotal() ? tlec - 1 : tlec;