@Name (JavaScript)

Returns a component of or reformats a hierarchical name.

Defined in

@Functions (JavaScript)

Syntax

@Name(action:string, name:string) : string
Parameter Description
action Manipulation action. See the table below.
name The hierarchical name.
Return value Description
string The component or reformatted name.

Usage

The manipulation actions are as follows:
Action Description
[A] Returns the ADMD component (administration management domain name) of a hierarchical name.
[ABBREVIATE] Abbreviates a hierarchical name, removing the component labels. This saves space in the display, and looks friendlier.
[ADDRESS821] Returns an Internet address in the format based on RFC 821 Address Format Syntax regardless of whether the original address was in RFC 821 or RFC 822 form. Case must be exact.
[C] Returns the country/region component of a hierarchical name.
[CANONICALIZE] Expands an abbreviated name, adding in whatever components are missing, as well as their labels. Missing components are taken from the current user ID, not from the Domino® Directory.
[CN] Returns:
  • Common name component of a Domino® name.
  • Local part of an Internet address in the format based on RFC 821 Address Format Syntax.
  • Phrase part of an Internet address in the format based on RFC 822 Address Format Syntax.
[G] Returns the given name component (the first name) of a hierarchical name.
[HIERARCHYONLY] Strips the CN component of a hierarchical name and returns the remaining components.
[I] Returns the initials component of a hierarchical name.
[LP] Returns the LocalPart of a standard Internet address based on RFC 822 Address Format Syntax.
[O] Returns the organization component of the hierarchical name.
[OUn] Returns the specified organizational unit component of a hierarchical name; n can be from 1 to 4, as in OU1. In the canonical form of the name, the OU components are not numbered; however, they are counted from right to left so that the first occurrence of the OU label is treated as OU1, the second occurrence is treated as OU2, and so on. Domino® does not accept OU as a keyword.
[P] Returns the PRMD component (private management domain name) of a hierarchical name.
[PHRASE] Returns the Phrase part of a standard Internet address based on RFC 822 Address Format Syntax.
[Q] Returns the generation component (such as "Jr") of a hierarchical name.
[S] Returns the surname component (the last name) of a hierarchical name.
[TOAT] Returns the LDAP AttributeType name when a Domino® field name is provided.
[TODATATYPE] Returns the Domino® data type name when an LDAP Syntax name is provided.
[TOFIELD] Returns the Domino® field name when an LDAP AttributeType name is provided.
[TOFORM] Returns the Domino® form name when an LDAP ObjectClass name is provided.
[TOKEYWORD] Reverses the order in which the naming components are displayed, and replaces slashes with backslashes: Country\Organization\Organization Unit. This is useful when you want to categorize a view by the components of a user's hierarchical name (backslashes represent subcategories in views). This option does not return the common name portion of the user name.
[TOOC] Returns the LDAP ObjectClass name when a Domino® form or subform name is provided.
[TOSYNTAX] Returns the LDAP Syntax name when a Domino® data type name is provided.

Examples

If @UserName() returns CN=Roberta Person/OU=NY/O=Acme, the following is true.
This returns Roberta Person/NY/Acme.
@Name("[ABBREVIATE]", @UserName())
This returns Roberta Person.
@Name("[CN]", @UserName())