Returns the Nth parameter value specified by index. The index value is zero-based, so an index of zero returns the second parameter
string uChoice(index, values, ...)
The index number referencing the return value. Zero based.
List of values.
IF construct:
uChoice(0, "A", "B") // returns "A" uChoice(1, “A”, “B”) // returns “B”
CASE constructs:
uChoice(2, "n.a.", "Jan", "Feb", "Mar") //returns "Feb"
Simulate a lookup function where you want to replace a color ID with a corresponding color name:
uChoice(IN.Color, “n.a.”, “Red”, “Blue”, “Green”)
Returns the first parameter value that is different from the first parameter.
string uFirstDifferent(params, ... )
A list of expressions or values of any data type.
To find the first different attribute in a list:
uFirstDifferent("2004-05-01", "2004-05-01", "2005-01-04", "2005-11-24",) //returns "2005-01-04"
Returns the first non-null value in the list.
string uFirstNotNull(params, ...)
A list of expressions or values of any data type.
To merge four distinct attribute values:
uFirstNotNull(null, null , "A", "B") // returns "A"
Returns the number of elements in a delimited string. If the second parameter is omitted, a space (ASCII 32) will be taken as a delimiter.
string uElements(text [, delimiter])
A string to investigate.
The delimiter to be used. The default delimiter is a space character.
To count tokens in a delimited string:
uElements("James T. Kirk") // returns 3
Returns the Nth element from a delimited string. The second parameter specifies the token number. The index starts at 1. If the third parameter is omitted, a space (ASCII 32) is taken as the delimiter.
string uToken(text, index [, delimiter])
A string to investigate.
Number of tokens to be returned.
The delimiter to be used. The default delimiter is a space character.
To split a delimited string:
uToken("James T. Kirk", 1) // returns "James" uToken("James T. Kirk", 2) // returns "T."