Hi all, I am newbie on UIPATH. Can anyone help me solve this problem by LINQ?
Gashu
Hi all, I am newbie on UIPATH. Can anyone help me solve this problem by LINQ?
Gashu
@Gashu.REMUS
Welcome to the forum
give a try on following:
prepare an empty datatable - assign activity:
left side: dtReport
right side: YourOriginDatatableVar.Clone
use an assign activity:
left side: dtreport
right side:
(From d in YourOriginDatatableVar.AsEnumerable
Group d by k=d("GroupID").toString.Trim into grp=Group
let n = String.Join(",",grp.Select(Function (x) x("Value1").toString.Trim).Distinct())
let p = String.Join(",",grp.Select(Function (x) x("Value2").toString.Trim).Distinct())
let ra = new Object(){k,n,p}
Select dtReport.Rows.Add(ra)).CopyToDataTable
Thank you for your help! However, I had got the error as below:
Assign: Object reference not set to an instance of an object.
Gashu
is this done and ensured?
Also the output from the LINQ is returned to dtReport:
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.