/
listToString
listToString
Function: listToString()
This function takes a list and returns a string which is the concatenation of the string representation of each element of the list, with each element separated by a comma.
Null values will be returned as empty strings (see example 1).
Syntax
listToString(array)
listToString(array, separator)
listToString(array, separator, ignoreNullFlag)
listToString(array, separator, ignoreNullFlag, stringFormat)
Argument | Type | Description |
---|---|---|
array | Array | List of values |
separator | String | String to be used to separate the concatenated strings generated by the function |
ignoreNullFlag | Boolean | Flag to determine whether NULL strings are ignored by the function. Set to 1 or 0, where 1 is ignore and 0 is include. By default NULL values are included. |
stringFormat | String | Optional parameter which applies to dates only. This represents the format to use for each element of the list where the list items are dates. |
Examples
listToString(["apple",1,"John",NULL,"dog"])
returns
"apple,1,John,,dog"
listToString(["apple",1,"John",NULL,"dog"],"--")
returns
"apple--1--John----dog"
listToString(["apple",1,"John",NULL,"dog"],"--",1)
returns
"apple--1--John--dog"
listToString([01/09/2010,01/10/2010,NULL,01/11/2010],"--",1,"dd MMM yyyy")
returns
"01 Sep 2010--01 Oct 2010--01 Nov 2010"
See Also
Related content
addElement
addElement
Read with this
listToString
listToString
More like this
listToString
listToString
More like this
listToString
listToString
More like this
concatenateList
concatenateList
More like this