How to Filter data between two datatables

I have DataTable A and DataTableB in my project, From DataTables A - Column ‘Affected CI’ and From DataTable B Column ‘Configuration Item’ has the matching values.

Now when Column ‘Affected CI’ value from DataTables A match ‘Configuration Item’ value from DataTable B. It should select the complete row of data from DataTable B.

Your help would be much appreciated!

Hi @praveenpolu

Check this

Row (“Affected CI”). ToString.equals(row(“configuration”). ToString
Dt2.Select("[Columnname]<>’’"). CopyTodatatable ()


Hope we have two datatable ready
—first create a datatble with same structure of these two datatable we have now using BUILD DATATABLE ACTIVITY and get the output with a variable named Finaldt
—once after datatable been fetched use a for each row loop and pass the datatable DatatableA as input and change the variable name from row to row1
—inside this loop use another for each row loop and pass DatatableB as input and change the variable name from row to row2
—now use a IF condition and mention like this
row1(“Affected CI”).ToString.Equals(row2(“Configuration Item”).Tostring)

If true it will go to THEN part where we can use a ADD DATAROW ACTIVITY where in the ArrayRow property mention as row1 and in the datatable mention as Finaldt

Followed by this use a BREAK activity within the THEN apart atlast so that it won’t loop again and again once after the match is found

So this add datarow activity would add the datarow that matches, to the Finaldt datatable

Hope this would help you
Cheers @praveenpolu