Is anyone familiar with Remove Duplicate Rows (from the DataTable Activities)? I am pulling a large data table from SharePoint but I want to delete rows that have the same code in a certain column. So for example I have 5 columns in my data table and a lot of rows. I want to delete duplicates that that are contained in one of the columns. Does that make sense? Can anyone help?
Thanks for the response but I donât want to delete entire columns I just want to delete entire rows where the same code is found in âColumn 1â. Does that make sense?
OK. I see that it wonât delete the entire columns but it doesnât seem to work for me. The problem is (i think) that the entire row is not a duplicate. There are duplicates in âcolumn 1â. I want to delete the entire row if there are duplicate codes in âcolumn 1â even though column 2,3,4 etc may not be duplicate. So in the screen shot below I want to get rid of test 2 and test 3 (the entire rows) but keep test 1 in the data table
Hi
this expression could help you with datatable = datatable.AsEnumerable().GroupBy(Function(a) a.Field(of string)(âyourcolumnnnameâ).ToString).Select(Function(b) b.First()).CopyToDatatable()
if you are not getting asenumberable then kindly have a view on this thread