How to get key by value in Dictionary UIPath?

0 votes

Hi guys. 

I am using For Each to display each item using dict.values. The problem is I can't get key by value of the item in dictionary.  

Please suggest any ideas. 

.

Thanks.

Jul 6 in RPA by Slava
• 120 points
36 views

1 answer to this question.

+1 vote

Hi Slava, I think you are facing this issue because you didn't initialized the dictionary. When you insert AddToDictionary activity to the sequence and create a dictionary variable you have to initialize it with newDictionary() method. You can initialize a dictionary in 2 ways:

1. Use Assign activity to assign dict variable to newDictionary(key_variable_type, value_variable_type):

  dict = newDictionary(Of String, String)

2. Initialize the dictionary while creating the variable by providing default value as newDictionary(Of String, String)

To understand better, checkout this thread: https://www.edureka.co/community/41092/can-i-create-dictionary-in-uipath-studio-and-add-items-to-it?show=41092#q41092

answered Jul 8 by Abha
• 16,440 points

Related Questions In RPA

0 votes
1 answer

How to access specific key and value from dictionary without loop in uipath

Hello, you can access value of a ...READ MORE

answered May 2 in RPA by Anvi
• 10,310 points
228 views
0 votes
1 answer

How to loop through a dictionary in UiPath?

Hey @Ravi, if you have a dictionary ...READ MORE

answered Mar 13 in RPA by Anvi
• 10,310 points
598 views
0 votes
1 answer

How to scrape data using Get Text from UI Automation tools in UiPath?

Hi Roshni, scraping any text from a web page ...READ MORE

answered Mar 20 in RPA by Pratibha
• 2,740 points
114 views
0 votes
1 answer

Robot Manager in UiPath

the robot.exe file is located in: C:\Users\USER_ACCOUNT\AppData\Local\UiPath\app-17.1.6523\Ui-Robot.exe Hope it ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,090 points
305 views
0 votes
1 answer

Automation in Uipath

you can use the Database package for connecting  ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,090 points
254 views
0 votes
1 answer

UiPath vs Workfusion

in WorkFusion, you can create a script ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,090 points
899 views
0 votes
3 answers

Any open source tools for RPA ?

Yes, here is the Free RPA tool ...READ MORE

answered Oct 24, 2018 in RPA by Karthiksiddhu
• 240 points
163 views
0 votes
1 answer

How to move all files from Source to Destination Folder in UiPath?

Hi Pragati, in order to move files ...READ MORE

answered Mar 7 in RPA by Abha
• 16,440 points
385 views
0 votes
1 answer

How can I connect Robots to Orchestrator in UiPath?

Hey Rakshit, for connecting Robots to Orchestrator, ...READ MORE

answered Mar 11 in RPA by Abha
• 16,440 points
1,524 views