CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • should you import country name or abbreviation with contacts?
Pages: [1]

Author Topic: should you import country name or abbreviation with contacts?  (Read 3072 times)

webguy2

  • Guest
should you import country name or abbreviation with contacts?
August 20, 2009, 01:03:55 pm
I have been importing the country name along with contacts' address and have had a rash or random errors.  Should I import a country code or abbreviation?  If so, where do I get the correct codes?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: should you import country name or abbreviation with contacts?
August 20, 2009, 04:41:32 pm

I would use country code

check the database table civicrm_country to get a valid list of country abbreviations that CiviCRM recognizes

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: should you import country name or abbreviation with contacts?
August 21, 2009, 05:44:22 am
To import country and state w/ contact -

lets take a example of county = "united states" and state = "California"

supportable value formats are :
country = "US" or "United States"  ( ie both "iso code" as well as "name" )
state  = "CA" or "California" ( ie both "abbreviation" as well as "name" )

but civicrm does not support data like county = "1228" and state = "1004"
(these are 'civicrm_country' and "civicrm_state_province" tables id, corresponding to "United States" and "California" respectively )

Also make sure state and country should be enabled.
( go to Administer CiviCRM -> Global Settings -> Localization -> check "Available Countries" and "Available States and Provinces"
http://drupal.demo.civicrm.org/civicrm/admin/setting/localization?reset=1 )

hope this help

kiran
You Are Designed To Choose... Defined By Choice.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • should you import country name or abbreviation with contacts?

This forum was archived on 2017-11-26.