Get Data from collection to another collection
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-09-20 02:10 PM
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
------------------------------
------------------------------
Nael Altunesi
Blue Prism-Digitalization
Volvo cars
Gothenburg
0046760955339
------------------------------
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-09-20 04:45 PM
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
------------------------------
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
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-09-20 02:10 PM
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
------------------------------
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
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-10-20 04:38 PM
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
------------------------------
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
