cloneCollection (NotesViewEntryCollection - JavaScript)

Returns a NotesViewEntryCollection object that is a copy of the original collection.

Defined in

NotesViewEntryCollection

Syntax

cloneCollection() : NotesViewEntryCollection

Examples

This button gets all documents in a view that match either of two user search queries.
if (requestScope.query.isEmpty()) return;
if (!database.isFTIndexed()) database.createFTIndex(0, false);
var vec1:NotesViewEntryCollection = database.getView("main").getAllEntries();
var vec2:NotesViewEntryCollection = vec1.cloneCollection();
vec1.FTSearch(requestScope.query);
vec2.FTSearch(requestScope.query2);
vec1.merge(vec2);
if (vec1.getCount() > 0) {
	var entry:NotesViewEntry = vec1.getFirstEntry();
	while (entry != null) {
		requestScope.status += "\n" + 
			entry.getDocument().getItemValueString("subject");
		entry = vec1.getNextEntry(entry);
	}
} else {
	requestScope.status =  "No match";
}