Creates a new List object
There are three variants that differ by the data that is initially added to the list:
Variant 1: Creates an empty list
Variant 3: Takes the string representation of a list, with single values delimited by some substring like a comma, semicolon. The parameters specify the list string and the delimiter. The new list ist initialized with the single values from the list string.
For backward compatibility there still is a method "createList()" available on TMLContext whose use is discouraged since OpenWGA 5.3.
Variant 2: Array whose elements are added to the list
Variant 3: String containing single values delimited by a special substring
Variant 3: The delimiter substring used in parameter "liststring"
|Return value||A new List object|
|Allowed in script types||
Using the array from this.cookies to create a list:
var cookiesList = WGA.createList(this.cookies);
Here a list string containing city names, delimited by commas, is used to feed the list:
var cityList = WGA.createList("Munich,Madrid,London", ",");
The result is a list of three elements: