Hey,
I am trying to add data row from data-table with n-columns to data dictionary. This will be one key with many values, depending on the column you call from your dictionary.
for ex., in pseudo
|Testcase |TravelCntry|TravelDestination_1|TravelDestination_2|Adult1Age|Adult2Age|FName|LName|
TripCanada | Canada | Ontario | Quebec | 38 | 28 | John |Doe|
and many more columns for the testcase, so I have selected that row, I should be able to recall
row(“TripCanada”).Value(TravelDestination_1), this should give me Ontario
I tried using tuples, but tuples doesn’t count for unknown number of columns.
I already have values in dt, I want to be able to read the values by name from dictionary. Also, the columns length is unknown, it is on the fly suck the data in the data dictionary and then recall in application particular data wherever it is needed
Also, I may not be in the same sequence, so little more explanation:
I loop through the dt until I find the testcase.
Once I find the testcase, I want to capture that in dictionary.
Then I leave the dt loop and continue to my application
I’m curious why you need to put the row into a dictionary when you can just reference the row values when you need them as you loop through the datatable.
This will go in the library. There will be many testcases/rows, I need to find the one I am looking for and exit the dt. Then I should be able to use the dict values outside of the loop.
Ok then it’s a reasonable process to put it into a dictionary. Another option would be just capture the row index - then you can directly reference the row outside the loop.