2 Datatables

Hi Team,

Inputs are 2 datatable:
image

image

Output:
image

HI @yash.choursia

Try to loop through the first DataTable
and use a lookup datatable in on 2nd datatable, based on Material keyword. (Assuming in 2nd Datatable there should be common field to map plant against something.)

Get the value from LookUp > ValueFound
and use an assign activity: currentRow(“Plant”)= ValueFound.

Exit loop

Thanks
Happy Automation! :smiley:

i dont have any key here. i just need to add the column

and would there be any no of rows or just one plant value?
If there’s gonna be one plant value
just simply use Read Cell activity, store the data in a variable ValueFound

Loop through DT1:
assign CurrentRow(“Plant”)= ValueFound.
exit loop.

Write Range to get your result.

Thanks

Happy Automation! :smiley:

Hi @yash.choursia

Follow this:

  1. Get the column by using:(dt is 2nd datatable)
    col = dt.Columns(0) for getting the 1st column in datatable(plant)
  2. Use insert column activity to insert the column.

@yash.choursia

Easiest way would be read the plant table and then use write range with B2 as the range and plantdt as the datatable

cheers

1 Like