Operator Scope of Action:
Operator First Added:
Operator Last Altered:
Function [other Function type actions]
Item [operators of similar scope]
Data manipulation [other Data manipulation operators]
As at baseline
This function returns the evaluated format of each of its comma-delimited argument list of expressions.
Expression arguments can be:
- Literal values:
Fredthough there is little point in using these unless the list is subsequently to be concatenated to a String.
- Basic literal operations
"Fred"+" " +Smith".
- Arithmetic operations:
- Attributes (values) both system e.g.
$Nameand user attributes e.g.
- Action operators
- Action code expressions, as in whole code expressions
$MyDate = max($MyDateA,$MyDateB,$MyDateC);
The latter fails as max() interprets the list as 3 literal strings "$MyDateA", etc., and does a lexical sort on those values. However:
$MyDate = max(list($MyDateA,$MyDateB,$MyDateC));
Functions creating lists (sum(), links(), collect(), etc.) do not have the same problems with the likes of max as the former output a valid list that can be used directly. For instance:
$MyDate = max(links.outbound.attended.$MyDate);
For more complex examples, where list items are action code expressions, it may be necessary to use eval() to wrap each list item expression, e.g.
This returns a list of numbers resulting from simple evaluations:
Output value, a list:
This example, this makes a single evaluated string out of a list of two expressions:
list("This note 's $Width is "+$Width, "the $Xpos is "+$Xpos).format(" and ")+"!")
Output value, a string:
This note's $Width is 3 and the $Xpos is 48.5!
This example is not overly complex but points to how list() can be used in constructing output strings/lists that are otherwise difficult to create. The more complex the expressions passed to list() the greater the likelihood of getting no output, or an unexpected one. If complex inputs do not work consider using more parentheses to help TB figure the order of sub-task execution or else put the result of expressions into new attributes and then pass the value of the latter into list() as an argument.