Skip to main content

addAll (Function)

Function returns the updated list after adding all the values from the given list.

Syntax​

<OBJECT> list:addAll(<OBJECT> to.list, <OBJECT> from.list)
<OBJECT> list:addAll(<OBJECT> to.list, <OBJECT> from.list, <BOOL> is.distinct)

Query Parameters​

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
to.listThe list into which the values need to copied.OBJECTNoYes
from.listThe list from which the values are copied.OBJECTNoYes
is.distinctIf true returns list with distinct valuesfalseBOOLYesYes

Example 1​

list:putAll(toList, fromList)

If toList contains values (IBM, gdn), and if fromList contains values (IBM, XYZ), then the function returns updated toList with values (IBM, gdn, IBM, XYZ).

Example 2​

list:putAll(toList, fromList, true)

If toList contains values (IBM, gdn), and if fromList contains values (IBM, XYZ), then the function returns updated toList with values (IBM, gdn, XYZ).