Cannot insert DataTable into DataRow


I get a table from Excel as DT, perform some data manipulation on that DT and later need to insert this DT into a column of type DataTable in DataRow. Yet it does not work for my DT but works for some test datatable created with BuildDataTable activity. There is no error. It just doesn’t work.

DT after manipulation:

AddDataRow - ArrayRow input is used:

Result - DT is not inserted:

I know what is the problem but I don’t know why it is a problem.
After executing this piece of code I can no longer input DT into DataRow. Why it is so? It is a bug or is there some logical explanation for it? It seems that by using AsEnumerable this DT is not perceived as ‘regular/typical’ DT by UiPath (even though 99,99% of DT functionalities still work)

dt_report = dt_report.AsEnumerable().GroupBy(Function(a) Tuple.Create(a(“Reference_document”).ToString, a(“Reference_item”).ToString)).Select(Function(b) b.First).CopyToDatatable()


In local panel, TableName of datatable is displayed there as the following. And datatable exists as item of the datatable. (See dt3 in the following image.)


You are right, everything is working, debug was just not displaying any DT name because it disappeared after using AsEnumerable(). Thanks!

1 Like

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