How to access Data row


#1

I am doing advance training from academy. Where I am stuck at, extracting data from the acme website (for all work item) then I am filtering the extracted data using select but this data is saved into data row rather than data table. Now i have option to save individual column using add data row then finally writing in to other excel & reading first column this excel & use to update the filter work item.
I wanted to know is there any workaround for directly using filtered data table column rather than saving it & then reading it.


#2

Hi,

Datatable.select() returns array of Datarow, you can convert this using CopytoDataTable and then iterate the result using for each row. Use below expression

FilteredDataTable = DataTable.select(“ItemType = WI5”).CopytoDataTable


#3

Thanks for the reply Bharat.
I tried that by building a DT (FDT) & assigning the filtered DT to newly created DT as,
FDT = ExtractDataTable.Select(“Type=‘WI5’ And Status=‘Open’”).CopyToDataTable
But its giving me error as, Assign : Cannot find column [Type].


#4

It needs to match the name of the column in the ExtractDataTable.

Try using the Output Data Table activity and output the full table to the console. The top rows will be actual names of the columns in your extracted DataTable. My bet is that it did not read the headers properly and the column is still called something like Column-1.


#5

I don’t know whats wrong with the tool? I have created a separate sequence for extracting the WI; And its working fine without Build DT or output DT.

Anyways thanks all.