Hello,
I have a case to find duplicate in data table like this :
I want to change the value of other column at first row has duplicate like this :
I’m sorry if i am not good in english. so maybe any idea to solve this case
Thank you!
Hello,
I have a case to find duplicate in data table like this :
I want to change the value of other column at first row has duplicate like this :
I’m sorry if i am not good in english. so maybe any idea to solve this case
Thank you!
try this
Sequence1.xaml (15.8 KB)
before
after
logic
dt.Rows(cint(dtNew.Rows(0)("RowNumber")))("Status") = Active (Duplicate)
Hi,
FYI, another solution:
dtResult = dt.AsEnumerable.Select(Function(r) dt.Clone.LoadDataRow(if(dt.AsEnumerable.Count(Function(r2) DataRowComparer.Default.Equals(r,r2))>1 AndAlso dt.AsEnumerable.Take(dt.Rows.IndexOf(r)+1).Count(Function(r2) DataRowComparer.Default.Equals(r,r2))=1 ,r.ItemArray.Take(2).Concat({r(2).ToString+"(Duplicate)"}).ToArray,r.ItemArray),False)).CopyToDataTable
Main.xaml (8.2 KB)
Regards,
Column name
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.