Skip to main content

%Library.Name

Class %Library.Name Extends %DataType [ SqlCategory = NAME, System = 2 ]

The %Name data type class represents a string containing a name.

The logical value of the %Name data type is a string of the form "lastname,firstname".

The %Name data type has special indexing support when used in conjunction with the %Storage.Persistent class (see the INDEXSUBSCRIPTS parameter).

Parameters

COLLATION

Parameter COLLATION [ Constraint = ",ALPHAUP,EXACT,MINUS,MVR,PLUS,SPACE,COLLATE,SQLSTRING,SQLUPPER,STRING,TRUNCATE,UPPER,", Flags = ENUMEDIT ] = "SQLUPPER";

The default collation value used for this data type.

MAXLEN

Parameter MAXLEN As INTEGER = 25;

The maximum number of characters the string can contain.

INDEXSUBSCRIPTS

Parameter INDEXSUBSCRIPTS = 2;

The number of subscripts used by the attribute in indices. This parameter, if present, tells the methods of the %Storage.Persistent class (that is, the default storage structure) the number of subscripts used by the attribute in indices, using a comma as a delimiter in the property value.

The %Name data type has the value 2 for INDEXSUBSCRIPTS, meaning the 1st comma piece of the name (the last name) is stored as the first subscript and the 2nd comma piece of the name (the first name) is stored as the second subscript.

XSDTYPE

Parameter XSDTYPE = "string";

Declares the XSD type used when projecting XML Schemas.

JSONTYPE

Parameter JSONTYPE = "string";

JSONTYPE is JSON type used for this datatype.

Methods

DisplayToLogical

ClassMethod DisplayToLogical(%val As %String = "") As %Name [ CodeMode = expression, ServerOnly = 0 ]

Converts the input value %val, which is a string representing a name, into the internal format.

Returns the internal value of the input string %val.

IsValid

ClassMethod IsValid(%val As %RawString) As %Status [ CodeMode = generator, ServerOnly = 0 ]

Tests if the logical value %val, which is a string, is valid. The validation is based on the class parameter settings used for the class attribute this data type is associated with.

LogicalToDisplay

ClassMethod LogicalToDisplay(%val As %Name = "") As %String [ CodeMode = expression, ServerOnly = 0 ]

Converts the value of %val into a display string.

Returns the formatted value of %val.