Flatten Function

Description:
This function turns a list of lists into a flat list, irrespective of the depth of the sub-lists and irrespective of mixture of sub-lists and literals. Any blank values are removed.
Returns:
Any*
Parameters:
Parameter
Data Type
Description
1
Any**
List of lists that needs to be turned into a single flat list.
Examples:
When using functions inside a field, remember the field brackets:
{flatten(list(List1,List2,List3))}
Expression
Result
{flatten(list(list("1"),list("2"),list("3")))}
List("1","2",”3”)
{flatten(list(list(list("1")),list(list("2", "3"))))}
List("1","2",”3”)
You can specify the separators for your resulting list by adding the format parameter to your field.
For example: {flatten(list(list("1"),list("2"),list("3"))) format "^L"}

Related content