Brian Dunning's FileMaker Custom Functions

GetCountryFromCountryCode ( CountryCode )

Get full country name from country code

  Average rating: 3.8 (49 votes) Log in to vote

Andy Knasinski   Andy Knasinski
nrg Software, LLC.
http://www.nrgsoft.com

Share on Facebook Share on Twitter

  Sample input:
GetCountryFromCountryCode ( "YE" )
  Sample output:
Yemen

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Convert ISO country code to full country name

 

Comments

HOnza   HOnza, Prague
Apr 26, 2011
Great idea, faster and easier to use than related table (unless you need the country names in multiple languages).

Why are all country names in all upper case? We can always use Upper if we want it this way, but if we want the country name with correct case, this custom function will fail.

I would also suggest adding last update date in the function as a comment because this kind of function can be obsoleted by political changes.
 
john renfrew   john renfrew, attitude
May 24, 2011
The ISO 3166-1 lists all have the names a UPPERcase interestingly, but this list is not correct to it.

http://www.iso.org/iso/country_codes/iso_3166_code_lists/iso-3166-1_decoding_table.htm
 
Andy   Andy, NRG
May 24, 2011
ISO lists the country names in uppercase. Just posted updated list with modified date and comments in script with country names in proper case, you can now convert on your own to uppercase. While the ISO list is helpful, we work with the ship carriers and have had to create our own conversion tables from ISO to carrier names for compliance in our certified shipping solutions for USPS, UPS and FedEx.
 
Ward   Ward, Massachusetts, USA
Nov 30, 2012
FileMaker Pro 11 Advanced chokes on this line:

CountryCode = "ST" ; "S„o TomÈ and PrÌncipe" ;

I replaced the accented name with "Sao Tome and Principe" from Wikipedia's ISO 31166-1 alpha-2 page:

http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.