IsValid (NotesViewEntry - JavaScript™)
Read-only. Indicates whether a view entry is a valid entry and not a deletion stub.
Defined in
NotesViewEntrySyntax
isValid() : boolean
Legal value | Description |
---|---|
true |
if the entry is valid |
false |
if the entry is not valid |
Usage
If a document is removed after a view entry collection containing it is created, you can use the corresponding view entry for navigation but cannot access the document. If the possibility of removal exists, you should checkisValid
before
attempting to access the document.Examples
This button gets the entries from a categorized view, displaying the first column if the entry is a category and a document item if the entry is a document, and marking non-valid documents.var nav:NotesViewNavigator = database.getView("By category").createViewNav();
var entry:NotesViewEntry = nav.getFirst();
while (entry != null) {
if (entry.isCategory()) {
requestScope.status += "\n" +
entry.getColumnValues().firstElement().toString();
} else if (entry.isDocument()) {
requestScope.status += "\n\t" +
entry.getDocument().getItemValueString("subject");
if (!entry.isValid()) {
requestScope.status += " [is not valid]";
}
}
var tmpentry:NotesViewEntry = nav.getNext(entry);
entry.recycle();
entry = tmpentry;
}