This is the documentation for the development version. There are no official binaries for it; build it from the source code in git. Download links on these pages work only after the release. For the current release, see version 7.0.

mapList

mapList(table, list, separator, default=null): String

Lookup multiple keys (separated by user-defined separator) from mapping table. Result string is joined using the same separator.

Table 1. Parameters

table

name or ID of the mapping table.

list

string of keys separated by separator.

separator

separator used to split list and to produce output. Only the first character is used for splitting.

default

Optional. Value used for keys not found in the mapping table. If omitted, an empty string is used for such keys.

Return

String with mapped values joined by separator. If the mapping table does not exist, list is returned unchanged.

Provided that there is a mapping table named "table1", which has keys 10, 20 and 30 with corresponding values "value1", "value2" and "value3":

println(mapList("table1", "10,20,30", ",")); // prints "value1,value2,value3"
println(mapList("table1", "10,20,30,40", ",", "NOT FOUND"));  // prints "value1,value2,value3,NOT FOUND"