You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
LIST
Creates a list based on a value. Is the inverse of the UNPACK function.
Syntax
LIST ( attribute/collection )
Inputs
- attribute - An attribute of any data type.
- collection/list - A collection or list of values.
Return type
- a multivalued list with entries of any type
Examples
Expression | Result | Type |
---|---|---|
LIST ( "Blueriq" ) | [ "Blueriq" ] | String (multivalued) |
LIST ( 5 ) | [ 5 ] | Integer (multivalued) |
LIST ( ? ) | [] | Any (multivalued) |
Suppose the following data model.
Person.name | Person.SequenceNumber |
---|---|
“Bob” | 654 |
“Jane” | 523 |
“Mary” | 667 |
“Rick” | 500 |
“Ron” | 490 |
“Jenny” | ? |
LIST ( COLLECT Person.name FROM ALL Person ) = [ "Bob" , "Jane" , "Mary" , "Rick" , "Ron" , "Jenny" ]
- In this example the
LIST
function adds no value, as the result of theCOLLECT
is already a list.
- In this example the
LIST ( COLLECT Person.SequenceNumber FROM ALL Person ) = []
- As Jenny has an unknown sequence number, the result of the
COLLECT
expression is?
. TheLIST
function creates an empty list in case the parameter has?
value.
- As Jenny has an unknown sequence number, the result of the
Overview
Content Tools