Compare two rows in data table with multiple columns

Hello folks i want to compare two rows in data table with multiple columns
if two or more rows are same i want to process only one row
ex:col1 col2 col3
aa 11 ss
aa 11 ss
bb

can any one help me thank you…

Hi @venkateshgorantla,

Here you can get the logic to compare 2 Datatables . The same manner you can do it the UiPath Studio.

Regards
Balamurugan.S

hey @balupad14 i am not comparing two tables, i am having data in single table

Try below code!

[datatablename].DefaultView.ToTable(True,“col1”,“col2”,“col3”)

1 Like

Thanks a lot @Vinutha its working fine thank you so much.

But one thing i want to now i am getting only three columns which i have mention in above code .
in my case i want all columns which are in datatable after applying this code .
awaiting reply.once again thank you very much.

If you are using 2018.3 or higher, there is an activity itself which removes duplicate rows.

image

I am not using latest version.
can you please help me if any you have any other idea…
thank you

You just have to specify all the columns as comma separated.

[datatablename].DefaultView.ToTable(True,“col1”,“col2”,“col3”,“col4”,“col5”, {etc})

2 Likes

thanks @Vinutha its working fine :smiley:

1 Like

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