Skip to content

Collections Activities

Version: 1.0.0  ·  ID: zoan-packages-collections  ·  Author: Zoan Software

The Collections package creates and manipulates the two most commonly used collection types: lists (sequences of elements) and dictionaries (key→value pairs). It is used to accumulate results, keep records, group related data or configure options.

Almost everything these activities do also has a direct equivalent in an expression. For example:

GoalActivityEquivalent expression
Contar elementosList Count= count(list) o = list.Count
Element by indexGet List Item= list[0]
Does it contain?List Contains= list.Contains(valor)
Value of a keyGet Dictionary Value= dictGet(d, "clave") or = d["clave"]
Add to listAdd to List= listAdd(list, valor)

Which one to use? The activities make the flow more explicit and visual (useful for those just starting out). The expressions are shorter and more comfortable when you are already inside another formula. Both are correct — choose according to whether you prefer clarity or concision. See Expressions › Collections.

Activities that return a result (count, get, check) save it in the variable that you indicate in the outputVariable field.

ActivityTypeOutputWhat it does
Create Listlist-createListCreate an empty list
Add to Listlist-addAdd an item
Get List Itemlist-getobjectElement by index
List Countlist-countintNumber of elements
List Containslist-containsbooleanDoes it contain an element?
Remove from Listlist-remove-atDelete by index
Clear Listlist-clearEmpty the list
ActivityTypeOutputWhat it does
Create Dictionarydict-createDictionaryCreate an empty dictionary
Set Dictionary Valuedict-setAssign/update a key
Get Dictionary Valuedict-getobjectValue of a key
Dictionary Contains Keydict-contains-keybooleanDoes the key exist?
Dictionary Countdict-countintNumber of pairs
Get Dictionary Keysdict-keysListAll the keys
Remove Dictionary Keydict-removeDelete a key