I have a data table of two column named material and component with some existing data and at every next loop iteration i am adding some data in both column by using merge datable activity.
My requirement is that, new row only should be added if the column value of material is not present in existing data table, if the new row’s material column value is already present in data table then it should not be added.
Likei have a dadatable:
material component
A 1005
B 1006
and if a row comes with value A 1003
then it should not be added because of A is already there.
Hi @Yankit_singh !
I suggest you to use a list to avoid double values
Here is an example of the way to use the list of string Sequence.xaml (7.0 KB)
So in your datatable, inside the foreach row, you add in the list row("material").tostring
If the row(“material”).tostring already exist in the list(of string), then it will do nothing, else you have to add what you want to do.
I am merging two data tables dt1 and dt2 inside a do while loop and my requirement is that only those entry from dt2 should be merged in dt1 for which first column value is unique, rest of column value doesn’t matter.
like if dt1 have A 4002
B 1006
and dt2 have A 2003
then after merging these data tables dt1 should have same as before merge, because of A is already in dt1, it should not be added.