Hi RPA Experts, kindly help me how to get value from Dictionary variable , with latest community update we are facing challenge to provide key to dictionary variable.
Hi RPA Experts, kindly help me how to get value from Dictionary variable , with latest community update we are facing challenge to provide key to dictionary variable.
Dictionary variables are key/value pairs and can contain a number of variable types, including strings. First, you need to know what kind of value the Dictionary contains. For example, if it contains strings, that Dictionary variable can be used anywhere a String variable could be used.
When you press F2 (or select the Insert Variable icon), choose your Dictionary variable and enter the key. That will return the value associated with the key.
For more information about Dictionary variables, please see this article on our docs site:
This is what I see (and you’re right… it is quite different):
You should be able to display a Message Box with Dictionary of Strings or Dictionary of Any, with the caveat that a Dictionary of Any will return an error if the value contained in that Any key is anything other than a string value.
Aaron.Gleason this is old one , pls update the bot agent and try now, you will face challenge.
Before update old version : Working fine
New version : Not working - UI itself different
I am getting empty message box as output and in methods I can see only string operation, Also I tried with Get action from Dictionary.
Not sure how to get the value from dictionary.
Where to give key .. this is the big question
I can see variable and String.. no option for key
I’m not able to replicate the blank value using a Dictionary of Strings. I might recommend running your automation in Debug mode and inspecting the value of the Dictionary variable.
Working with a Dictionary variable has turned into a two-part endeavor: First, select the Dictionary variable.
Then click Add expression item and enter the key “By name”.
I think that’s what you have in your second screen shot a few posts above.
Yes correct , but message box is empty , I am getting value from pdf file using extract field.
example - invoice number - 12345
So InvoiceNumber is key
Now I can see when we give Key as String , it’s not adding double quotes, may be due to this ?
You can try adding the double quotes. It won’t hurt anything. Usually, if the key contains a space (as mine does with “First Name”), the system puts double quotes around it. Your key, InvoiceNumber, doesn’t contain a space.
I still might set a breakpoint at your Message Box and run in Debug mode so you can inspect the Dictionary variable values. Can’t hurt, right?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.