Skip to content

Collection Operations ​

Creates, modifies, and queries in-memory list and dictionary collections during workflow execution.

Purpose ​

Use this task to manage runtime collections that accumulate or transform data as the workflow progresses. It supports both ordered lists and keyed dictionaries, covering common operations such as adding items, removing items, counting, querying, joining to a string, and serialising to JSON. The result of each operation is either stored back into the named collection or written to a separate output variable for use in downstream tasks.

Inputs ​

FieldTypeRequiredDescription
Collection NameTextYesThe workflow variable name of the collection to operate on.
OperationDropdownYesThe operation to perform. See Operations table below.
Collection TypeDropdownNoThe type of collection to create. Options: List<object>, List<string>, List<int>, List<double>, Dictionary<string,string>, Dictionary<string,object>, Dictionary<int,string>, Dictionary<int,object>.
ValueTextNoThe value to add, remove, or check for.
ValuesTextNoAn array of values to add at once. Accepts a variable reference or JSON array.
IndexTextNoThe zero-based index position for retrieval or removal.
SeparatorTextNoThe delimiter used when joining collection items into a string. Defaults to , .
KeyTextNoThe key for dictionary set, retrieval, removal, or existence checks.
Key-Value PairsKey-Value PairsNoA set of key-value pairs to add to a dictionary collection.
Output Variable NameTextNoThe name of the workflow variable in which to store the operation result.

Visibility Rules ​

Collection Type is only shown when Operation is set to Initialize.

Value is only shown when Operation is set to Add, Remove, or Contains.

Values is only shown when Operation is set to AddRange.

Index is only shown when Operation is set to RemoveAt or Get.

Separator is only shown when Operation is set to Join.

Key is only shown when Operation is set to Set, GetByKey, RemoveKey, or ContainsKey.

Key-Value Pairs is only shown when Operation is set to Set or AddRange.

Output Variable Name is only shown when Operation is set to Count, Contains, Get, GetAll, Join, ToJson, GetByKey, ContainsKey, GetKeys, or GetValues.

Operations ​

OperationDescription
InitializeCreates a new empty collection of the specified type.
AddAppends a single value to a list.
AddRangeAppends multiple values to a list, or merges key-value pairs into a dictionary.
RemoveRemoves the first matching value from a list.
RemoveAtRemoves the item at the specified index from a list.
ClearRemoves all items from a list or dictionary.
CountReturns the number of items in the collection.
ContainsReturns true if the specified value exists in a list.
GetReturns the item at the specified index from a list.
GetAllReturns the entire collection.
JoinConcatenates all list items into a single string using the specified separator.
ToJsonSerialises the collection to a JSON string.
SetAdds or updates a key-value entry in a dictionary.
GetByKeyRetrieves the value for a specified key from a dictionary.
RemoveKeyRemoves a key-value entry from a dictionary.
ContainsKeyReturns true if the specified key exists in a dictionary.
GetKeysReturns all keys from a dictionary as a list.
GetValuesReturns all values from a dictionary as a list.

Outputs ​

The result is stored in the variable named by Output Variable Name when provided. For operations that modify the collection (Initialize, Add, AddRange, Remove, RemoveAt, Clear, Set, RemoveKey), the collection itself is updated in-place under its Collection Name variable.

NameDescription
The result of the operation: a count (integer), boolean, string, JSON string, single item, or full collection, depending on the operation performed.

Tentech