cancel
Showing results for 
Search instead for 
Did you mean: 

Get Data from collection to another collection

NaelAltunesi1
Level 2
Please I have one question about how I can get the country name instead of  country code in the collection , I have the data in excel file with county code and country name. And I have the country code in a collection and in another collection there is a country name and code.  So I need to get the country name instead of country code. Tow collection and excel file.

------------------------------
Nael Altunesi
Blue Prism-Digitalization
Volvo cars
Gothenburg
0046760955339
------------------------------
3 REPLIES 3

AndreyKudinov
Level 10
Add new column for country to 1st collection
Loop over it
Filter 2nd collection by code from 1st collection
Copy country name into new field in first collection

------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------

loganathans
Level 3
You can try to use Code stage to do this activity.

may be you can try this below  one : (  Lookup function) 
dim myDict As Dictionary(Of String, String) = new Dictionary(Of String, String)
for each ro as dataRow in sourceCol.rows
if myDict.containskey(ro.item(searchColNameInSource)) = false then
myDict.add (ro.item(searchColNameInSource), ro.item(resultColNameInSource))
end if
next


for each ro as dataRow in mainCol.rows
if myDict.containsKey(ro.item(searchColNameInMain)) = true then
ro.item(resultColNameInMain) = myDict(ro.item(searchColNameInMain))
end if
next

updatedCol = mainCol

------------------------------
loganathan s
IT Developer
DXC
Asia/Kolkata
------------------------------

InJoeKhor
Staff
Staff
Hi Nael,

One suggestion is to use object: utility- collection manipulation. Action: filter collection.
As an input collection use the collection you retrieved from the Excel file which has the country code and name, then use filter collection to sort that through..

Thanks,

------------------------------
In Joe Khor
Sr. Product Consultant
Blue Prism
------------------------------
In Joe Khor Sr. Product Consultant Blue Prism