Create Dictionary
Create Dictionary
Section titled “Create Dictionary”Type: dict-create · Package: Collections Activities v1.0.3 · Output: Dictionary
Creates a dictionary (key→value map), empty or already holding its initial entries. Useful to group related data under names ("name", "taxId", "total") or to build configurations.
How it works
Section titled “How it works”In the Designer, entries is edited with a dictionary editor: one row per key-value pair. Each value accepts a literal or an expression, evaluated when the activity runs. If you leave entries empty, the dictionary is created empty and you then add pairs with Set Dictionary Value.
- Keys are text and case-sensitive.
- If
entriesis an expression that already returns aDictionary<string, object>, that same dictionary is used; any other result produces an empty dictionary.
Required parameters
Section titled “Required parameters”None.
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
entries | Dictionary | — | Initial key-value pairs. Leave empty for an empty dictionary. |
Output
Section titled “Output”Returns a Dictionary (Dictionary<string, object>) with the given entries, or empty. Store it with the activity’s output field.
Common errors
Section titled “Common errors”This activity practically cannot fail: it can only fail if the expression of a value in entries has an error, and the message is then that expression’s error.
Example
Section titled “Example”Create Dictionary entries: { name: "Northwind Trading", taxId: "900123456" } → output: customerSet Dictionary Value dict = customer key = "total" value = invoiceTotalLog message = "Customer: " + str(customer["name"])Related activities
Section titled “Related activities”- Set Dictionary Value — add key-value pairs.
- Get Dictionary Value — read a value.
- Create List — create a list.