data table lookup

Hi all,

I already have two data tables, DT1 and DT2. DT has two (2) columns namely “PO” and “Item”. DT2 has several columns, and “Item” is now labeled as “Assembly”.

What I am trying to achieve is to use each “Item” from DT1 and search for it in DT2.

I’m thinking of using a For Each loop in DT1 then an IF inside so that if “Item” and “Assembly” matches, it will return a value/execute another activity.

Appreciate any help and feedback.

@RojemMolina

Use For Each loop for DT1 after that you can use Assign activity as Item = row(“Item”).ToString

Now use Filter Datatable activity and use DT2 in that where the “Assembly” = Item

output as some temporary DT let’s say DT3

Use If Condition If the DT3.Rows.Count > 0 that means it has a matching row / rows

Else No match

Hope this may help you

Thanks

Hi!

As already mentioned, you can use For each row loop in DT1. Inside Body you can use Lookup data table activity to lookup “Item” value in DT2 for each row. Then when you find correct “Assembly” in DT2 you can work with that for each row of DT1.

Hope this helps!