How to call datatable from config file

Hi Team,

input file:
Test_url

In my config file I have a sheet with name called (Test_Url) I need to use this sheet data table in the process side. For that i took read range activity and gave the data table variable for that sheet in init state but I don’t know how to call this data table in the process side.

Please help me anyone out from this.

Regards,
Raja G

Hi @Raja.G,

You can refer to your Config DataTable by Row and Item, like so: ConfigDT.Rows(0).Item(1).ToString . This would be the first row, second item in the DataTable (either B1’s “URL” or B2’s “abc.com” depending on whether you have headers or not).

You could alternatively refer to your Config as a dictionary. You can loop through each row of the datatable and add it to a dictionary, the datatype I use is Dictionary<String,String>

To refer to a value in your dictionary, you would specify ConfigDict("AA") to get the URL abc.com

Hope this helps

2 Likes

Hi @Raja.G

Just assign the data table to dictionary and again retrieve datatable in process state by converting back that to DT.

Thanks,
Boopathi.ExtractDTfromConfig.zip (9.0 KB)

2 Likes

@Boopathi.M ,

Thank you so much working fine

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.