Take same data in 2 difference table to another table

example:
table 1
column 1 | column 2
ali 2016
abu 2017

table 2
column 1 | column 2
ali 2016
akil 2018

result=table 3
column 1 | column 2
ali 2016

1 Like

any good workflow to get the result?
tq

1 Like

@syaheed22,

  1. Take two For Each Row activities to iterate those two dataTables.

If (row1(“Column1”). tostring = row2(“Column1”). tostring AND row1(“Column2”). tostring = row2(“Column2”). tostring)
Then add data row to new dataTable
Else skip that row

1 Like

can u explain more sir? sorry im new. If could, can u show me the flow

1 Like

HI @syaheed22

You can try using the data table join functionality to find similar records in the two datatables.

You can find this activity under data table activities in Uipath Studio

Use the inner join to get only the matched records as the output. The matched records are the output that you need for your data table 3
image

Let know how this works for you…

3 Likes

@syaheed22,

Please find the attached file.

JoinDataTable.zip (11.0 KB)

1 Like

i got this issue. my studio cant update and dont have latest package. so sad, u have another method sir?

@syaheed22,

That is For Each Row activity. For this, we need to Install UIpath.System.Activities package.

By the way, which version of UIpath are you using ?

10.2.3 i cannt update it anymore for now. So, i need to use for each row activity? what array i must write?

@syaheed22

Inner Join is the concept which will work in this situation. As @Lahiru.Fernando shared the link. Please go through the same and let us know incase of any issues.

2 Likes

Hi @syaheed22,

The error you are getting because, the for each row has been updated and we have a new output variable as CurrentIndex, but in old version of for each there was no index property.

So you can follow the below step, after that for each will work.

image

Please open the xaml file in Notepad and search for For each as shown in attachment and remove the highlighted text (CurrentIndex=“{x:Null}”)

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