Compare two datatables and keep only the values from one dt

Hello everybody,

I need help !
I have two datatables. One master datatable (dt1) with all the items and values : like following

And I have a second datatable (dt2) with values that I have to remove from the master Datatable

Basically, I need to remove the list of “groupe marchandises” (dt2) from the list of the Master Datatable (dt1).
If I am not clear, tell so i can be more precise.

I tryied with a lookup datatable activity, but not sure that it is the right activity to do so.

Can anyone help me out please ?

maybe @ppr @Parth_Doshi can help please ?

Thank again for taking time !

Regards

Najoua

@najoua.abbaci

Give a try on

Assign Activity
Left Side dtfiltered datatype:datatable
Right side

(From d in dt1.asenumerable
Where Not dt2.asenumerable.any(function (x) x(1).toString.trim.equals(d(0).toString.trim))
Select d).copytodatatable

Expect some typos or wrong (. ). As my Cellphone Tries to pair programming with me and Breaks the Code

IT should keep the row from dt1 when the Code is Not found on any row in dt2

Let US know If IT was working thanks

1 Like

Thank you very much it is working perfectly !!!

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