setAliases (NotesView - JavaScript™)
Sets the aliases of a view.
Defined in
NotesViewSyntax
setAliases(aliases:string) : void
Parameter | Description |
---|---|
aliases |
The new aliases. A null or empty value removes all aliases. |
Usage
These aliases replace any existing aliases.Use
the vertical bar to delineate multiple aliases. For example, Alias1|Alias2
specifies
two aliases.
See Aliases to get and set aliases as a vector of strings.
Examples
This button adds one or more aliases. The user query is expected to use the vertical bar to indicate multiple aliases.var v:NotesView = database.getView("main");
var aliases:string = requestScope.query;
if (aliases.isEmpty()) {
v.setAliases(null);
requestScope.status = "No alias";
} else {
v.setAliases(aliases);
requestScope.status = aliases.indexOf("|") < 0 ? "One alias" : "Multiple aliases";
}