DirWiz Logo
Knowledgebase

Article Tags

Can you set the proper Country Code based on the Country attribute value?

2017-05-22 15:03:27
Custom Mapping Features UnitySync 

Yes! There is a solution to set Country via a Country Code Lookup Table.

To enable the lookup on the country mapping, use a custom mapping for the country attribute (c=) similar to the following. The opening and closing characters indicate the value should be run through the Lookup table during the Sync, and the #3 ensures the value will never be longer than 3 characters.

c#3=^SourceAttrib^

The following may be entered into the Custom tab’s Lookup window, allowing translation of country names into country codes.

Note: *The entire list below should be copied into the Lookup table available on the Custom tab of the connection. You may need to review and update this list for accuracy depending on your own country names values or country code requirements.**

United States|US
United State of America|US
Andorra|AD
United Arab Emirates|AE
Afghanistan|AF
Antigua and Barbuda|AG
Anguilla|AI
Albania|AL
Armenia|AM
Netherlands Antilles|AN
Angola|AO
ARIPO|AP
Argentina|AR
Austria|AT
Australia|AU
Aruba|AW
Azerbaijan|AZ
Bosnia and Herzegovina|BA
Barbados|BB
Bangladesh|BD
Belgium|BE
Burkina Faso|BF
Bulgaria|BG
Bahrain|BH
Burundi|BI
Benin|BJ
Bermuda|BM
Brunei Darussalam|BN
Bolivia|BO
Brazil|BR
Bahamas|BS
Bhutan|BT
Burma|BU
Bouvet Island|BV
Botswana|BW
BBM and BBDM|BX
Belarus|BY
Belize|BZ
Canada|CA
Central African Republic|CF
Congo|CG
Switzerland|CH
Cote d'Ivoire|CI
Cook Islands|CK
Chile|CL
Cameroon|CM
China|CN
Colombia|CO
Costa Rica|CR
Czechoslovakia|CS
Cuba|CU
Cape Verde|CV
Cyprus|CY
Czech Republic|CZ
East Germany|DD
Germany|DE
Djibouti|DJ
Denmark|DK
Dominica|DM
Dominican Republic|DO
Algeria|DZ
EAPO|EA
Ecuador|EC
Estonia|EE
Egypt|EG
Western Sahara|EH
OHIM|EM
EPO|EP
Spain|ES
Ethiopia|ET
Finland|FI
Fiji|FJ
Falkland Island|FK
Micronesia|FM
Faroe Islands|FO
France|FR
Gabon|GA
United Kingdom|GB
Grenada|GD
Georgia|GE
Ghana|GH
Gibraltar|GI
Greenland|GL
Gambia|GM
Guinea|GN
Equatorial Guinea|GQ
Greece|GR
South Georgia and The South Sandwich Islands|GS
Guatemala|GT
Guinea-Bissau|GW
Guyana|GY
Hong Kong|HK
Honduras|HN
Croatia|HR
Haiti|HT
Hungary|HU
Volta|HV
IIB|IB
Indonesia|ID
Ireland|IE
Israel|IL
India|IN
Iraq|IQ
Iran|IR
Iceland|IS
Italy|IT
Jamaica|JM
Jordan|JO
Japan|JP
Kenya|KE
Kyrgyzstan|KG
Kampuchea|KH
Kiribati|KI
Comoros|KM
Saint Kitts and Nevis|KN
North Korea|KP
South Korea|KR
Kuwait|KW
Cayman Islands|KY
Kazakhstan|KZ
Laos|LA
Lebanon|LB
Saint Lucia|LC
Liechtenstein|LI
Sri Lanka|LK
Liberia|LR
Lesotho|LS
Lithuania|LT
Luxembourg|LU
Libya|LY
Morocco|MA
Monaco|MC
Moldova|MD
Madagascar|MG
Marshall Islands|MH
Macedonia|MK
Mali|ML
Myanmar|MM
Mongolia|MN
Macao|MO
Northern Mariana Islands|MP
Mauritania|MR
Montserrat|MS
Malta|MT
Mauritius|MU
Maldives|MV
Malawi|MW
Mexico|MX
Malaysia|MY
Mozambique|MZ
Namibia|NA
Niger|NE
Nigeria|NG
Nicaragua|NI
Netherlands(Holland)|NL
Norway|NO
Nepal|NP
Nauru|NR
New Zealand|NZ
OAPI|OA
Oman|OM
Panama|PA
Peru|PE
Papua New Guinea|PG
Philippines|PH
Pakistan|PK
Poland|PL
Portugal|PT
Paraguay|PY
Qatar|QA
Rhodesia|RH
Romania|RO
Russian Federation|RU
Rwanda|RW
Saudi Arabia|SA
Solomon Islands|SB
Seychelles|SC
Sudan|SD
Sweden|SE
Singapore|SG
Saint Helena|SH
Slovenia|SI
Slovakia|SK
Sierra Leone|SL
San Marino|SM
Senegal|SN
Somalia|SO
Suriname|SR
Sao Tome and Principe|ST
Soviet Union|SU
El Salvador|SV
Syria|SY
Swaziland|SZ
Turks and Caicos Islands|TC
Chad|TD
Togo|TG
Thailand|TH
Tajikistan|TJ
Turkmenistan|TM
Tunisia|TN
Tonga|TO
East Timor|TP
Turkey|TR
Trinidad and Tobago|TT
Tuvalu|TV
Taiwan|TW
Tanzania|TZ
Ukraine|UA
Uganda|UG
Uruguay|UY
Uzbekistan|UZ
Vatican City|VA
Saint Vincent and the Grenadines|VC
Venezuela|VE
British Virgin Islands|VG
Vietnam|VN
Vanuatu|VU
WIPO|WO
Samoa|WS
Other Country in Asia|X1
Other Country in North America|X2
Other Country in South America|X3
Other Country in Europe|X4
Other Country In Oceania|X5
Other Country in Africa|X6
Other Country|XX
Republic of Yemen|YD
Yemen|YE
Yugoslavia|YU
South Africa|ZA
Zambia|ZM
Zaire|ZR
Zimbabwe|ZW

Share this article: Twitter reddit