use an assign and clone the datatable structure with
left side:dtResult
right side: YourDataTableVar.Clone
Use an assign activity:
left side: dtResult
right side:
(From d In YourDataTableVar.AsEnumerable
Group d by k=d(0).toString.Trim Into grp=Group
let ra = new Object(){k, String.Join(“^”, grp.Select(Function ( r ) r(1).toString.Trim).toArray)}
Select dtResult.Rows.Add(ra)).CopyToDataTable
An alternate to total LINQ would be:
Keys = YourDataTableVar.AsEnumerable.Select(Function ( r ) r(0).toString.Trim).Distinct().toArray
with a for each you can iterate over the keys and the key can be used for a filter datatable to retieve the group rows
Thanks for the reply, but are D & K the headers for each column? I used this in an assign but keeps telling me ‘end of expression expected’ I must not be understanding part of it…