yah we can do that either in UiPath in a easier way
like in studio at the VARIABLE panel
give the name of the variable as dic_variable
and variable type as System.Collections.Generic.Dictionary(of string)(string) and to search this type we can click on Browse for types in variable type column in variable panel
then scope - set that to the whole sequence as a global variable
and in default value field mention as New Dictionary(of string, string) from {{“key1”,“value1”},{“key2”,“value2”}}
and if we want to add them once after creating a dicitonary variable then we can use ADD TO DICTIONARY ACTIVITY OR With a simple assign activity like this dic_variable(“your keyname”) = “your value”