Adding a value to a Dictionary in an UiPath Assign

Let’s say I have a UiPath variable called Dict of type Dictionary<String,String>.

I would like to add an entry with key “Key” and value “Value”.

How do you do that in an UiPath assign?

Dict.Add(“Key”, “Value”) on the left hand side of the Assign?

Many thanks.

Assign activity
myDictVar("myKey") = ValueOrValueVar

Also have a look here:
:ambulance: :sos: [FirstAid] Migration to Windows target Framework - Missing Microsoft.Activities.Extensions package - Dictionary Activities - News / Vote on Tutorials - UiPath Community Forum

1 Like

Unfortunately, it doesn’t work, unless you create an instance of the Dictionary in VBScript.
Cf. How to use dictionaries in UiPath

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.