Copy the data from one dt to another by matching the row value

I have a DT which is in unsorted order, then i make a copy and sort the DT (to meet some of my requirements) and i pass data to SAP, which returns Completed or failed. Once all the rows are processed, I want to update the status value from the copied DT to the main DT(unsorted).

Input
image
After Processing
image
The output i am expecting
image

Thankyou

Hi @hansen_Lobo

Try with VLOOKUP function

is it guranteed, that after sorting the position will still be valid?

We do have a duplicated 31.

Lets assume:
1,2,31,4,5,31
31,31 Execution with result Failed, Completed

After sorting Failed, Completed should be kept in the order, otherwise the first 31 will be paired with the second 31 result

@hansen_Lobo

By using VLOOKUP

O/P:
Book1.xlsx (9.7 KB)

Please find the below xaml for your reference

BlankProcess12.zip (133.8 KB)

Hope this helps!!

@hansen_Lobo

you try with the linq query aslo

refer the below xaml

updatedstatus.zip (10.2 KB)

1 Like

This is called a join, it’s a standard database operation. Use the Join Data Table activity.

We keep in mind: Join is pairing and and not stack mapping

grafik
grafik

so we will get on duplicated 31 4 rows within the result

Oh I didn’t realize there are duplicate PO numbers here. Good catch.

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