How can I remove duplicates with 2 criteria and cancel the one that doesn't fulfill a condition?

I have 2 files that after making Append range, I eliminate the duplicated lines depending on (License Plate, Entry Date and entry time). It is perfect if both lines do not have a payment date ( BalaReva Remove Duplicates). In the case of having a payment date, this should be kept and the same line deleted without the payment date.

Hello @Jose_Bessa,

Please check this post.

Hi @Akshay07 - I have already found this code forum search. But the problem with this query is the payment Date column, if you look closely when you remove the duplicate from the mentioned 3 columns , system will keep the first row and delete the 2nd rows which is having the payment date 31-10-2020(As shown below), but the user is expecting that to keep in the output.

This seems to be tricky.

“If we sort the Payment Date column first (that will send all the empty rows to the bottom) then we can run this code” - @Jose_Bessa - Can you try this??

@Jose_Bessa - I was able to solve this. Idea is simple, First I sorted the Payment date Column (Desending), that send all the empty cell to the bottom. Then I used BalaReva “Remove Duplicate” activity. Here is the output (which is matching your output)

xaml image

Please mark this as solution, if its solves your query.

With the beginner in Uipath, I used this option and it works perfectly. Thank you for your help.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.