NotesName (LotusScript®)

Represents a name.

Containment

Contained by: NotesACLEntry, NotesSession

Properties

Abbreviated

Addr821

Addr822Comment1

Addr822Comment2

Addr822Comment3

Addr822LocalPart

Addr822Phrase

ADMD

Canonical

Common

Country

Generation

Given

Initials

IsHierarchical

Keyword

Language

Organization

OrgUnit1

OrgUnit2

OrgUnit3

OrgUnit4

Parent

PRMD

Surname

Methods

New

Creation

To create a new NotesName object, use one of the following:

  • New method
Note: The New method is not supported in COM.
  • CreateName method of NotesSession

Syntax

Dim variableName As New NotesName( name$ [ , language$ ] )

OR

Set notesName = New NotesName( name$ [ , language$ ] )

Parameters

name$

String. A name in one of the following formats:

  • Canonical hierarchical name
  • Abbreviated hierarchical name
  • Internet name (address)
  • Flat name

The name is flat if it does not conform to any of the other formats.

language$

String. Optional. A language associated with the user name. See @Locale in the formula language for a list of language codes.

Primary Domino® user names do not have a language. Alternate user names may have a language. See the Language property.

Usage

A canonical hierarchical name is a series of components separated by slashes. Each component starts with a keyword and equals sign. Domino® names use the following components: CN (common name), OU (organizational unit - up to four are permitted), O (organization), and C (country). Domino® names do not use the following components but this class recognizes them: G (given name), I (initial), S (surname), Q (generation; for example, "Jr"), A (ADMD name), and P (PRMD name).

Below is an example of a Domino® hierarchical name in canonical format. It uses two of the available organizational units. The hierarchy is right to left, so East is organizational unit 1 and Sales is organizational unit 2.

CN=John B Goode/OU=Sales/OU=East/O=Acme/C=US

An abbreviated name is a series of components separated by slashes. The components are not identified by keyword but depend on order for identification. The preceding name in abbreviated format is as follows:

John B Goode/Sales/East/Acme/US

This class does not abbreviate a canonical name if the abbreviation would be ambiguous. For example, "CN=John B Goode/OU=East" cannot be abbreviated because "East" would appear to be the organization (rather than an organizational unit). This class also does not abbreviate a canonical name if it contains any of the components not used in Domino® names.

A specification of an abbreviated name can include only those components used in Domino® names. The components must be in proper sequence. The following are acceptable:

  • common name/country
  • common name/organization (unless the name of the organization is identical to a country code)
  • common name/organization/country
  • common name/organizational unit/organization/country (up to four organizational units)

A common name by itself is interpreted as a flat name. A common name followed by a slash receives the organizational and country information of the effective user.

A name that conforms to RFC 821 or RFC 822 is interpreted as an Internet address. Examples of Internet addresses are as follows:

  • jbg@us.acme.com
  • "John B Goode" <jbg@us.acme.com>
  • "John B Goode" <jbg@us.acme.com> (Sales) (East)

Use UserNameList and UserNameObject in NotesSession to get the primary and alternate names for the current Domino® user. Use UserName and CommonUserName in NotesSession to get the full user name and common user name in String format.

Example