I have above table. My scenario is if we have same order no in multiple rows. i need to process first row data only. rest of the rows data need to skip(Same order no row data). I tried with skip commend inside for each row . It is not working.
I gave below code
Datatablename.asenumarable.skip(1).copydatatable
Use GroupBy on orderno column in DT
follow below link for grouping options
-
Use the Assign activity
FilteredDT = (From row In DatatableName.AsEnumerable() Group row By key = row(“Orderno”).ToString() Into Group Select Group.First()).CopyToDataTable() -
Now, use FilteredDT inside the For Each activity to process only the first occurrence of each OrderNo.
please try
dt.AsEnumerable.GroupBy(function(x) x("orderno").ToString).Select(function(x) x.First).CopyToDatatable
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
