I have two datatables.
I want the perform a look up operation between dt1 and dt2 using the coulmn of “Name”.
And i want the result as below.
Am already using lookup datatable option from uipath. But its taking more time to get the result.
I need to do it through linq or code to faster the lookup operation.
AshwinS2
(Ashwin S)
October 11, 2020, 4:30pm
2
Hi @Manikandasamy
Use merge datatable and try
Thanks
Ashwin.A
ppr
(Peter Preuss)
October 11, 2020, 10:13pm
3
@Manikandasamy
your case can be implemented on a LeftJoin Approach:
find a starter help based on the Join Datatable activity:
FullJoin_LookUpMatches_MatchResult.xaml (9.7 KB)
find a starter help based on a LINQ statement:
LeftJoin_1Col_LookupResult.xaml (8.8 KB)
2 Likes
@ppr
Thanks this works. I need a bit more help.
My datatable has more columns and i want to take all columns after the left join. Could you help me on that ?
ppr
(Peter Preuss)
October 22, 2020, 8:36am
5
just share some sample data along with the description of expected output with us. We will have a look on it.
Thanks
This is the expected result.
ppr
(Peter Preuss)
October 23, 2020, 8:36am
7
@Manikandasamy
give a try on following:
Use Join DataTable activity - Join type: Inner, dt1 to dt2 (out:dtJoin)
define a String Array with the Columns which you want to keep from dtJoin - arrCols
get result table by: dtJoin.DefaultView.toTable(false,arrCols)
the first requirement description was showing also the unmatched rows from dt2 in the result (hint for Full Join)
the second requirement description is showing the only common rows (hint for inner Join) and a selection of needed columns (hint for selecting with default view)
Also have a look here:
Dear innovator’s,
All we know that there is a Join Data table activity in UiPath.If we get any matching scenarios with unique value will approach join data table activity instead of filter/loop/array matching activity to find an exact match.
Join Data Table:
[image]
Combines rows from two tables by using values common to each other, according to a Join rule, which is specified in the Join Type property.
Sample Table:
[image]
INNER Join:
The INNER JOIN keyword selects records that have m…