Alternative to the Easy DataTable Activity

As we transition from Windows Legacy to Windows, the Easy DataTable activity has become unavailable, so please let me know if there are any alternative methods.
① Aggregation with Multiple Keys
We are aggregating the “Order Quantity” using the “Item” and “Item Name” as keys in the data table.

② Count with a Single Key
We are counting the quantity per “Item” in the data table.

Hello

There are several methods, but using LINQ can be fast and concise.

dt2 = dt.AsEnumerable().GroupBy(Function(r) Tuple.Create(r("Item").ToString(), r("ItemName").ToString())).Select(Function(g) dt.Clone().LoadDataRow({g.Key.Item1, g.Key.Item2, g.Sum(Function(r) CInt(r("OrderCount").ToString()))}, False)).CopyToDataTable


dt3 = dt.AsEnumerable().GroupBy(Function(r) r("Item").ToString()).Select(Function(g) dt3.LoadDataRow({g.Key, g.Count()}, False)).CopyToDataTable

Sample
Sample20260423-1.zip (4.2 KB)

It worked as intended! Thank you for the example as well.

I converted from the legacy version to Windows mode, though :slight_smile: