I need to check for repeated values and write in the status column “Duplicate”
Ex:
I need to check for repeated values and write in the status column “Duplicate”
Ex:
To check if a column in Excel has duplicate values and update the status column to “Duplicate” using UiPath and LINQ queries, you can follow these steps:
Make sure to replace "ColumnName"
with the actual name of the column you want to check for duplicates.
Hope it helps!!
Hi @Enzo_Antonio
Read range
For each
Assign activity
A=“”
Assign activity
Name1=current row(“Name”)
If A=Name1
Then write cell
Else
A=Name1
Hope it helps!!
what type should the variable “goupedData” be?
List of string datatype @Enzo_Antonio
dt.AsEnumerable.GroupBy(Function(val) val(“Name”)).Where(Function(val) val(“Name”).ToString.count >1).Select(Function(val) val.(“Name”).Last).ToArray
This will give an array of values that have more than one value. Search for these values in the datatable and mark as duplicates
Try this:
dt.AsEnumerable().GroupBy(Function(x) x("Name").ToString).Where(Function(g) g.Count() > 1).SelectMany(Function(g) g).ToList().ForEach(Sub(row) row("Status") = "Duplicate")
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.