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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Imported City/State info becomes a code
Pages: [1]

Author Topic: Imported City/State info becomes a code  (Read 1105 times)

georgerc

  • Guest
Imported City/State info becomes a code
January 14, 2009, 02:14:57 pm
I've imported a bunch of records from scanned business cards, and some of the data in the import file was off. Now when I go to update the City or state for any individual, they appear as four-digit code and won't accept a text entry. How do I get a drop down text list, or the ability to enter text?

Thanks in advance,
George :)

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: Imported City/State info becomes a code
January 15, 2009, 04:50:36 am
Hi.

  This is a strange one.. Some things that come to mind are Addresses settings- http://www.example.com/civicrm/admin/setting/preferences/address?reset=1
If you do have your site online i could peek real quick to check the settings or import mappings.

 FYI. - Civicrm stores state_province internally as a 4 digit code.
------------------------------------------------------------------------------------------------------
CREATE TABLE civicrm_state_province (
     id int unsigned NOT NULL AUTO_INCREMENT  COMMENT 'State / Province ID',
     name varchar(64)    COMMENT 'Name of State / Province',
     abbreviation varchar(4)    COMMENT '2-4 Character Abbreviation of State / Province',
     country_id int unsigned NOT NULL   COMMENT 'ID of Country that State / Province belong' ,
    PRIMARY KEY ( id ),
    UNIQUE INDEX UI_name_country_id(name, country_id),     
     CONSTRAINT FK_civicrm_state_province_country_id FOREIGN KEY (country_id) REFERENCES civicrm_country(id)   
)  ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci  ;
------------------------------------------------------------------------------------------------------
INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES
(1000, 1228, "AL", "Alabama"),
(1001, 1228, "AK", "Alaska"),
------------------------------------------------------------------------------------------------------

HTH.
Yashesh

georgerc

  • Guest
Re: Imported City/State info becomes a code
January 16, 2009, 03:10:34 pm
What I found out is that I'd misread how to use the Localization settings. I had tried to Add all the countries and states, which actually caused the problem I was having.

I undid that, and now everything works just fine (or at least the parts I have tested so far).

Thanks,
George  :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Imported City/State info becomes a code

This forum was archived on 2017-11-26.