Add datarow to resultDT if the datarow exists in DT2 and not in DT1

Hi there , I need your help !!!

Please tell me how to add datarow to resultDT if the datarow exists in DT2 and not in DT1.

DT1 (datatable)
|id|bane|role|old|
|1|bts|sing|25|
|2|itzy|dance|20|
|3|twice|dance|23|
|4|blackpink|all|24|

DT2(datatable)
|id|bane|role|old|
|1|bts|sing|25|
|2|itzy|dance|20|
|3|twice|dance|23|
|4|blackpink|all|24|
|5|exo|all|30|
|6|aespa|dance|19|
|7|iu|sing|28|

I have two excel data table .
DT1 is main datatable ,and I want to update and add data to DT1 from DT2 .
If datarow is already exist , update data .
But If the datarow does not exist in DT1, it will be added to DT2 .

Now, I was able to create an activity to update the datarow.
First, ForEachRow activity (index : rowInx_DT1)
Next, LookupDataTable activity
(input:DT2 lookupvalue:ID output:rowInx_DT2 searchColumn:ID)
Third, IF activity (condition:roeInx_DT2 <> -1)
Then , update data

Please help me how to write IF Activity to add datarow… :cry:

Hi @lianH

Please refer to the link below and append the result in Dt1!

Regards

1 Like