Get the Duplicate Rows depending on the conditions

Hello Everyone,

I am looking for a help on How to get the duplicate rows in a separate DT without removing them, depending on the conditions given on the Columns.

For Example:
If Payment /Receipt Reference and Credit LC matches then only we need to get the Duplicate rows in a Data Table.

Thank you very much in Advance.

Regards
Vishnu

@winningvish

  1. use Read Range activity to read the data from excel file and will give you output as dataTable say ‘DT’.

  2. Then try below expression to get duplicate records.

DuplicateDT = DT.DefaultView.ToTable(false,“Payment /Receipt Reference”,“Credit LC”).CopyToDataTable

Note: False - for Duplicate records
True - for Unique records

2 Likes

Hi @winningvish
To get the duplicate rows alone from a DT, kindly have a view on this once

Cheers @winningvish

2 Likes

Hi Lakshman,

Thank you for your kind reply.

As per your code it is giving entire rows.

Regards
Vishnu

1 Like

@winningvish

If possible could you please share that excel and xaml file. Will check and update you.

1 Like

Hi Palaniyappan,

Thank you but still in confusion to get the Duplicate Rows from DT. Would you please elaborate a bit more.
Before that let me explain my scenario again.

I have a Status Column and would like to get the Duplicate rows in a different DT.Jb1

Regards
Vishnu

Sure Lakshman,

Please find attachedDuplicateRows.zip (25.6 KB)

1 Like

I have a Status Column and would like to get the Duplicate rows in a different DT.Jb1

@winningvish

Sorry its my bad.

If you specify True, then it will delete duplicate records and will give unique records.

If you specify False, then it will give all records.

To find duplicate records, please check below thread.

1 Like

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