Duplicate row Uipath

For such type of duplication identification we can use groupby

in addition to:

from your excel we can derive:

  • grouping on Reference
  • take first groupmember Ref, date Desc, Amount
  • take last groupmember Amount and store it on TVS column

We do have some doubts and would recommend to recheck and redefine the Requirements (e.g. the case when more then 2 group members will occur.

In the meanwhile you can do:

dtResult = dtorig.Clone
Add TVS Column to dtResult

dtResult =

(From d In dtOrig.AsEnumerable
Group d By k=d("Reference").toString.Trim Into grp = Group
Let ra1 = grp.First().ItemArray
Let ra = ra1.Append(grp.Last()("Amount"))
Select r = dtResult.Rows.Add(ra)).CopyToDataTable