I have datatable as follows:
If the value is repeated more than once and contain “is found”, I want to remove the row contains “not found”.
in this case DailyMail1 and DailyMail2 not found should be remove. Others than that, I want to keep.
give a try at
(From d in YourDataTableVar.AsEnumerable
Group d By d(0).toString.Trim Into grp=Group
Let gFilter = grp.Where(Function (x) x(1).toString.ToUpper.Equals("IS FOUND"))
Let gFinal = If(gFilter.Count > 0, gFilter, grp)
From g In gFinal
Select r = g).CopyToDataTable
Find starter help here:
GroupBy_1Col_FilterMembers-WhenCheckOK.xaml (7.1 KB)
About LINQ and GroupBy have a look here:
[HowTo] LINQ (VB.Net) Learning Catalogue - Help / Something Else - UiPath Community Forum
Hi All, I manage to solve it by using RemoveDataRow Activity if previous row contain “not found” before using adding new row.