Save Part From The Datatable Variable


I read a table from a website and save it in Datatable variable, you can find below example from a table

I need your help to know how I can save the rows with the same transaction number in a new Datatable variable, so I can work separately in each transaction number.

we can do it with a group by.

Assign activity:
left side: TableList - Datatype: List(Of DataTable)
Right side:
(From d in YourDataTableVar.AsEnumerable
Group d by k=d(“Transaction Number”).toString.Trim into grp=Group
Select grp.CopyToDataTable).toList

also have a look here:

Retriving the distinct Transaction number we can do:

YourDataTableVar.AsEnumerable.Select(Function (x) x("Transaction Number").toString).Distinct().toList

and will reveive a list(Of String)