Multiple unique selection

I need to collect from a datatable the rows that have unique values in two of the columns, rows would be dismissed if both columns matches with other row’s columns:

An example of what I need to do:
column1,column2
A_____,B______
A_____,C______
C_____,B______
A_____,B______

From this datatable I would only need to take 3 of them (the ones that are different from eachother) but I can’t find an easy way of doing so, can I get some help?

@anon36905250,

Try below one to get unique records:

DataTableName.Defaultview.ToTable(true,“Column1”,“Column2”)

1 Like

do I put that on an assign of a datatable?
Also I need to have another row completly empty, don’t know if that’s possible in one command or if I need to put it in two

@anon36905250,

Yes.

newDataTable = DataTableName.Defaultview.ToTable(true,“Column1”,“Column2”).CopyToDataTable

sorry. I didn’t get you. Could you please tell more details.

from that datatable I need to extract the unique values of those two columns and make sure that another column is empty, I was wondering how do I put that

I was thinking of using a filter before putting that commnad line

Yes, first filter DataTable using Filter DataTable activity or apply select query on DataTable. Then apply above condition to that resulted DataTable.

newDT = DataTableName.select(“ColumnName”= ’ '").CopyToDataTable

after the filter I need to write this?
newDataTable = DataTableName.Defaultview.ToTable(true,“Column1”,“Column2”,“Column3Empty”,{Columns}).CopyToDataTable