Hi All,
I have datatable as follows:
DailyMail1,not found
DailyMail1,is found
DailyMail2,is found
DailyMail2,not found
DailyMail3,not found
DailyMail4,not found
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.
please help.
ppr
(Peter)
July 28, 2022, 8:02am
2
give a try at
Assign activity
dtFiltered =
(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.
Thanks All