Hi,
I’m having trouble joining two data tables where the matching fields are entered in comma separated text.
For example:
Dt1:
Name | Area
Adam | London
Adam | Manchester
Lucy | Liverpool
DT2
Name | Areas Covered | Job count
Adam |London, Manchester | 5
Lucy | Liverpool | 8
I’ve tried the UiPath Join activity, but because the field contains other data, it doesn’t match.
I’ve also tried a linq enumerable, but that doesn’t work either as UiPath throws an error when i change ‘Equals’ to contains:
(From DT1 In dt1.AsEnumerable() Join DT2 In dt2.AsEnumerable() On DT1(1).ToString() contains(DT2(1).ToString()) Select DT2).ToArray().CopyToDatatable
Hi,
Thanks for your reply & link.
The challenge i currently have is to perform an inner join, where two columns have similar values.
The video is more of an outer join, more so joining two data tables where there isn’t a common column.
Thanks @Steven_McKeering
In the second video theres a 1:1 match with the IDs - my challenge is where the data table cell contains a match, but it doesn’t equal it, so uipath treats it as false & disregards.
So the column Area = ‘London’ Whereas the column Areas Covered = ‘London, Manchester’
So the cell with ‘London’ doesn’t equal the cell with ‘London, Manchester’ as it contains the string rather than equalling the value.
(From DT1 In dt1.AsEnumerable()
From DT2 In dt2.AsEnumerable()
Where DT1(1).ToString().contains(DT2(1).ToString())
Select DT2).ToArray().CopyToDatatable