Name (NotesView - JavaScript™)
Read-write. The name of a view.
Defined in
NotesViewSyntax
getName() : string
setName(name:string) : void
Usage
Use Aliases to get and set the aliases.Old-style aliases that are in the name field, separated from the name by vertical bars, are returned as part of the name.
Examples
This computed field displays the name of the default view.var views = database.getViews().iterator();
while (views.hasNext()) {
var v = views.next();
if (v.isDefaultView()) {
return v.getName() + " is the default view."
}
}
return "There is no default view."
This button changes
the name of a folder.
var nameOld:string = requestScope.query;
if (nameOld.isEmpty()) {
requestScope.status = "No folder name specified";
return;
}
var folder:NotesView = database.getView(nameOld);
if (folder == null) {
requestScope.status = "No folder by that name";
return;
}
if (!folder.isFolder()) {
requestScope.status = "Not a folder";
}
var nameNew:string = requestScope.query2;
if (nameNew.isEmpty()) {
requestScope.status = "No new name specified";
return;
}
folder.setName(nameNew);
requestScope.status = "Folder name changed";