kana612
(果奈)
April 23, 2026, 12:24am
1
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.
Yoichi
(Yoichi)
April 23, 2026, 1:40am
2
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)
kana612
(果奈)
April 23, 2026, 2:47am
3
It worked as intended! Thank you for the example as well.
HANACCHI
(はなっち!UiPath Japan MVP 2019-2022)
April 23, 2026, 8:28am
4
I converted from the legacy version to Windows mode, though