Hi community,
I have a data table with similar data as shown below:
Now I wish to store each value from column2 into a variable with name as mentioned in column1.
Please help.
Hi community,
I have a data table with similar data as shown below:
Now I wish to store each value from column2 into a variable with name as mentioned in column1.
Please help.
Use a dictionary type variable…and then can assign the key as the name and value as the Score
create variable dict of type Dictionary(string,String) and initialize it in a Assign activity using dict = Dictionary(Of String,String)
Then use a for loop on datatable and then use assign inside
dict(currentrow("Name").ToString) = Currentrow("Score").ToString
Hope this helps
cheers
Welcome to UiPath community!
I agree with @Anil_G approach that suits for your requirement.
Few Point to Add
When you are creating a variable of type dictionary Select System.Collections.Generic.Dictionary(String,String)
Also, at the end if you want to see the Rahul score that was stored in the dictionary then take message box and use below exp
Your Dic var name("Rahul")
Below workflow for your ref
SampleProcess.zip (3.1 KB)