How to get the get data the from mapping file using inputfile?

Hi all,

i hope all are you doing great, im facing issue , that i have input file that contains 2 digit country code like India data will come IN. I want to convert that IN code into full country name using mapping file.
for example,
in input file Data data will come like IN
from mapping file i want to match the country code with inputfile and i want country name.
hope u understand.

thanks in advance.

image

image

@Gopi_Krishna_Reddy1

Read both the sheets into datatable dt1 and dt2

Now use a join datatable and perform inner join on both …which will give you the required country names in the output table

Join on receiving_address_country and country code

https://docs.uipath.com/activities/other/latest/workflow/join-data-tables#:~:text=Description,in%20the%20Join%20Type%20property.

Cheers

Read Range both into separate datatables
Join Datatable on Reciving_address_country = Country Code

  • Read CSV File - dtData
  • Assign Activity:
    dictLKCountryCode | Dictionary(Of String, String) =
dtData.AsEnumerable.ToDictionary(Function (x) x("Alpha-2 code").toString.Trim, Function (x) x("Country").toString.Trim)

then with e.g dictLKCountryCode (“AR”) Argentina will be returned

Feel free to use any other list from any other source or make your own CSV list

with above lookup dictionary it can be done within a for each row and updating the column value

  • For each row in Datatable | row in YourDataTableVar
    • assign Activity:
row(YourColNameOrIndex) =  dictLKCountryCode(row(YourColNameOrIndex).toString.Trim)

thanks for your help

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