List
Returns a concatenated list of non-blank values for a field or fields.
Format
List ( field {; field...} )
Parameters
field
- any related field, repeating field, or set of non-repeating fields; an expression that returns a field, repeating field, or set of non-repeating fields, or a variable.
Parameters in braces { } are optional.
Data type returned
text
Originated in version
8.5
Description
Each returned value, except the last, ends with a carriage return.
Use this function to return a list of values for:
- a single field
(table::field)
, which returns a single result over all repetitions (if any) for this field and over all matching related records, whether or not these records appear in a portal. - several fields and/or literal values
(table::field1,constant,table::field2...)
, which returns a separate result for each repetition of the calculation across each corresponding repetition of the fields. If any fields are related, only the first related record is used.
Notes
- When referencing multiple repeating fields, the List function returns the list of values across the first repetition in the calculation's first repetition, then the list of values across the second repetition in the second repetition, and so on.
Example 1
In the following examples:
- Field1 contains white.
- Field2 contains black.
- Field3 contains three repetitions with values of red, green, blue.
- Related::Field4 refers to three records that contain 100, 200, 300.
- $f1 contains orange¶purple.
List (Field1; Field2)
returns:
white
black
List(Field3)
returns:
red
green
blue
List ($f1; Field2)
returns:
orange
purple
black
List (Field1; Field2; Field3; $f1)
returns:
- in calculation repetition 1:
white
black
red
orange
purple
- in calculation repetition 2:
green
orange
purple
- in calculation repetition 3:
blue
orange
purple
List(Related::Field4)
returns:100
200
300