In this section, uppercase indicate function names. Brackets ([ ]) indicate optional arguments. If an optional argument is omitted, its default value is assumed.
In the examples, each sample call is followed by the result it produces. Although the examples use only string literals as arguments, each argument can itself be a complex string expression, including nested function calls.
AND returns the concatenation of two non-null strings, or the null string if either of the strings involved is null.
AND (exp1,exp2)
AND("A", "B")
AND ("", "B")
AND("A", "")
Result in the following:
"AB"
""
""
CFGPARM returns the value of a parameter in the Exchconn.ini file. Exp1 specifies the parameter whose value is to be returned; exp2 specifies the section within the .ini file. If the section is omitted, then the home section of the directory exchange agent (DXA) is used. If neither the section nor the parameter is found, the result is an empty string.
CFGPARM (exp1[,exp2])
CFGPARM( "executable")
CFGPARM( "locale", "dxm")
Result in the following:
"lsdxamex.exe"
"English"
CRLF returns standard ASCII carriage return and line feed control characters. This function is typically used to create multi-line attributes such as a postal address. However, you should only use CRLF if the attribute contains a value.
CRLF ()
"1234 Anystreet" CRLF() "Hometown, WA"
Result in the following:
1234 Anystreet
Hometown, WA
ISEQUAL returns the value of val1 if exp1 equals exp2; otherwise it returns the value of val2. ISEQUAL is not case-sensitive.
ISEQUAL (exp1, exp2, val1, val2)
ISEQUAL( "remote", "remote", "R", "L")
ISEQUAL( "remote", "local", "R", "L")
ISEQUAL( "remote", "REMOTE", "R", "L")
Result in the following:
"R"
"L"
"R"
LEFT returns the leftmost length characters of field. If the field has fewer than length characters, the result is padded on the right with the pad character. The default pad character is a blank.
LEFT (field, length[, pad])
LEFT ( "416-555-0100", "3" )
LEFT ( "triple", "9" )
LEFT ( "triple", "9", "x" )
Result in the following:
"100"
"triple "
"triplexxx"
LOWER returns the value of the field with any uppercase letters converted to lowercase.
LOWER (field)
LOWER ( "Maria" )
LOWER ( "Suzan" )
Result in the following:
"maria"
"suzan"
If the field contains a person's name in a specified format, NAMEF returns the person's first name or initial. Two styles are supported:
The default style is 1 if the field does not contain a comma; 2 if it does.
Initials or strings of initials are handled as first or middle names. If a name has only one part, it is considered both first and last name, regardless of the style.
NAMEF (field[, style])
NAMEF ( "Marea Angela Castaneda" )
NAMEF ( "M. A. Castaneda" )
NAMEF ( "MA Castaneda" )
NAMEF ( "Castaneda, Marea A.", "2" )
NAMEF ( "Suzan", "2" )
Result in the following:
"Marea"
"M."
"MA"
"Marea"
"Suzan"
If the field contains a person's name in a specified format, NAMEL returns the person's last name. Two styles are supported:
The default style is 1 if the field does not contain a comma; 2 if it does.
Initials or strings of initials are handled as first or middle names. If a name has only one part, it is considered both first and last name, regardless of the style.
NAMEL (field[, style])
NAMEL ( "Marea Angela Castaneda" )
NAMEL ( "M. A. Castaneda" )
NAMEL ( "MA Castaneda" )
NAMEL ( "Castaneda, Marea A.", "2" )
NAMEL ( "Suzan", "2" )
Result in the following:
"Castaneda"
"Castaneda"
"Castaneda"
"Castaneda"
"Suzan"
If the field contains a person's name in a specified format, NAMEM returns the person's middle name or initial. Two styles are supported:
The default style is 1 if the field does not contain a comma; 2 if it does.
Initials or strings of initials are handled as first or middle names. If a name has only one part, it is considered both first and last name, regardless of the style. Anything that is not identified as a first or last name is considered a middle name.
NAMEM (field[, style])
NAMEM ( "Marea Angela Castaneda" )
NAMEM ( "M. A. Castaneda" )
NAMEM ( "Castaneda, Marea A." )
NAMEM ( "Castaneda, Marea", "2" )
NAMEM ( "Castaneda, Marea A.", "2" )
NAMEM ( "Castaneda, Marea A. M.", "2" )
Result in the following:
"Angela "
"A."
"A."
""
"A."
"A. M."
POS returns the position of the string target within the field. If the target is not in the field, POS returns zero.
POS (field, target)
POS ( "Title: President", "Ti" )
POS ( "Title: President", ":" )
POS ( "Title: President", "Manager" )
Result in the following:
"1"
"6"
"0"
PROPER returns the value of the field with lowercase and uppercase letters converted to mixed case, as if the field were a proper name.
PROPER (field)
PROPER ( "seattle" )
PROPER ( "tim")
PROPER ( "o'brien" )
Result in the following:
"Seattle"
"Tim"
"O'Brien"
REPLACE enables you to remove specific characters from an ID or to replace selected characters with substitute characters. It scans field for any characters in the what string and replaces them with the corresponding character from the with string. If the with string is shorter or is not provided (meaning that one or more characters in what have no corresponding characters in with), those characters are removed from the field.
REPLACE (field, what[, with])
REPLACE ("Garth Fort"," ","_")
REPLACE ("Sales & Marketing E-mail Group"," ",".")
Result in the following:
"Garth_Fort"
"Sales.&.Marketing.E-mail.Group"
RIGHT returns the rightmost length characters of field. If field has fewer than length characters, the result is padded on the left with the pad character. The default pad character is a blank.
RIGHT (field, length[, pad])
RIGHT ( "416-555-0100", "7" )
RIGHT ( "416-555-0100", "8" )
RIGHT ( "node", "5", "@" )
Result in the following:
"55-0100"
"555-0100"
"@node"
STRIP locates the leftmost or rightmost occurrence of string2 in string1 and removes characters from the right or left, including string2. The value for scan-from-direction determines whether STRIP looks for the leftmost or rightmost occurrence of string2 in string1; the value for strip-toward-direction determines whether characters are removed from the left or right of where string2 starts.
If the either the scan-from-direction or the strip-toward-direction parameter is omitted, the value for the missing parameter is assumed to be the same as the one that is specified. If both these parameters are omitted, the default for both is assumed to be "R" (right).
STRIP (string1, string2[, scan-from-direction[, strip-toward-direction]]), where scan-from-direction= "L"|"R" and strip-toward-direction= "L"|"R"
STRIP ( "Senior Vice President", "Vice", "L" )
STRIP ( "Senior Vice President", "Vice", "R" )
STRIP ( "Senior Vice President", " " , "L")
STRIP ( "Senior Vice President", " ", "R" )
STRIP ( "Senior Vice President", " ", "R", "L" )
Result in the following:
" President" (Note the leading space.)
"Senior " (Note the trailing space.)
"Vice President"
"Senior Vice"
"President"
SUBSTR returns the portion of the field starting at position start, with length characters, padded with the pad character if necessary.
The default for length is (length of string - start + 1). The default pad character is a blank.
SUBSTR (field, start[, length[, pad]])
SUBSTR( "Vice-President", "6" )
SUBSTR( "Vice-President", "2", "3" )
SUBSTR( "Vice-President", "7", "9", "s" )
SUBSTR( "Vice-President", "11", "4" )
Result in the following:
"President"
"ice"
"residents"
"dent"
TRIM returns field with leading or trailing blanks removed. Option specifies whether to remove leading blanks (L), trailing blanks (R), or both (B).
TRIM (field[, option])
TRIM ( " Title ", "B" )
TRIM ( " Title ", "L" )
TRIM ( " Title ", "R" )
Result in the following:
"Title"
"Title "
" Title"
UPPER returns the value of field with any lowercase letters converted to uppercase.
UPPER (field)
UPPER ( "Seattle" )
UPPER ( "Suzan" )
Result in the following:
"SEATTLE"
"SUZAN"
WORD returns m blank-delimited words starting with the nth word in field. WORD returns an empty string if field contains fewer than n words. The default value for m is 1.
WORD (field, n[, m])
WORD ( "one of a kind", "1" )
WORD ( "one of a kind", "1", "2" )
WORD ( "one of a kind", "3", "2" )
WORD ( "one of a kind", "5" )
WORD ( "Marea A. Castaneda", "3" )
Result in the following:
"one"
"one of"
"a kind"
""
"Castaneda"
X500 returns the contents of the named field for the specified address. If the address has two or more components with the same field name, the index value is used to specify the correct one.
The following X.500-type addresses are supported:
X500 (address, field name[, index])
Suppose the value of the DN field is that provided in the following sample X500 address:
/o=Fabrikam/ou=
SalesOffice/cn=Recipients/cn=Notes_Users
Examples:
X500 ( DN, "ou")
X500 ( DN, "o")
X500 ( DN, "cn", 2)
Result in the following:
"Sales Office"
"Fabrikam"
"Notes_Users"
Related Topics
Customizing Attribute Mapping