ListAppend
Use this function to append a value or another list to a list.
where:
- list is a variable of type NUM[], STRING[], or RANGE.
- value is one of the following:
- If list is of type NUM[], value is the number to append to list.
- If list is of type STRING or RANGE, value is the string to append to list.
- list2 is a variable of the same type as list that contains the value to append.
Copy
Syntax example
CREATE VARIABLE myList1[] AS STRING
CREATE VARIABLE myList2[] AS STRING
CREATE VARIABLE aResult[] AS STRING
CREATE VARIABLE bResult[] AS STRING
SET VARIABLE myList1 = "a|b|c|d|e|f"
SET VARIABLE myList2 = "a|c|f"
Set VARIABLE aResult = ListAppend(myList1, "z")
Set VARIABLE bResult = ListAppend(myList1, myList2)
// In the above example, aResult equals a,b,c,d,e,f,z and bResult equals a,b,c,d,e,f,a,c,f.
Copy
Syntax example
CREATE VARIABLE stringList[] AS STRING
CREATE VARIABLE entity AS STRING
CREATE VARIABLE stringValue AS STRING
Set VARIABLE stringList = "A| B |C"
Set VARIABLE entity = "E11110"
Set VARIABLE stringValue = "Entity"
Set VARIABLE stringList = ListAppend(StringList, "$stringValue$")
Set VARIABLE stringList = ListAppend(StringList, "Entity")
Set VARIABLE stringList = ListAppend(StringList, "$Entity$")
Set VARIABLE stringList = ListAppend(StringList, $stringValue$)
Set VARIABLE stringList = ListAppend(StringList, $$stringValue$$)
Set VARIABLE stringList = ListAppend(StringList, stringValue)
//In the above example, stringList equals A, B ,C, Entity, Entity, E11110, E11110, E11110, Entity