Hello, I have few data in dictionary which were extracted from a file
dict(“Name”)= “ABC”
dic(“DOB”)= “09/09/1990”
in for loop 1 :dic(“Hobby_1”)=“Cooking”
:dic(“Hobby_2”)=“Reading”
:dic(“Hobby_3”)=“Dancing”
in for loop 2 :dic(“Favorites_1”)=“Coffee”
:dic(“Favorites_2”)=“Pizza”
:dic(“Favorites_3”)=“Shakes”
I want to add the above data in the datatable in the following way:
I already built data table using Build Datatable activity . Just the values are not getting added the way it want. It turns out to be something like this when I use add data row activity .
You are adding in the wrong way to the data table. Try the following logic -
for index = 1 to 3
if (index == 1)
add data row {dict(“Name”),dict(“DOB”),dict(“Hobby_1”),dict(“Favorites_1”)}
else
add data row {"","",dict(“Hobby_” + index.ToString),dict(“Favorites_” + index.ToString)}
next