selectAllNotes (NotesNoteCollection - JavaScript)

Selects or deselects all notes for inclusion in the collection.

Defined in

NotesNoteCollection

Syntax

selectAllNotes(selectorvalue:boolean) : void
Parameter Description
boolean
  • true includes all notes
  • false excludes all notes

Examples

This button creates a note collection from the current database and exports it to a text file as DXL. User input determines whether to send all notes or only data notes.
// Open DXL file
var stream:NotesStream = session.createStream();
var filename:string = "c:\\dxl\\";
filename = filename + database.getFileName();
filename = filename.substring(0, filename.length() - 3) + "dxl";
if (stream.open(filename)) {
	requestScope.status = "Opened " + filename;
	stream.truncate();

	// Create note collection
	var nc:NotesNoteCollection = database.createNoteCollection(false);
	if (requestScope.query.equalsIgnoreCase("all")) {
		nc.selectAllNotes(true);
	} else {
		nc.selectAllDataNotes(true);
	}
	
	nc.buildCollection();

	// Export note collection as DXL
	var exporter:NotesDxlExporter = session.createDxlExporter();
	var output:string = exporter.exportDxl(nc);
	stream.writeText(output);
	stream.close();
	requestScope.status = requestScope.status +
		"\nNote collection written to " + filename;
} else {
	requestScope.status = "Cannot open " + filename;
}