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) »
  • Importing street addresses in street_number street_name format
Pages: [1]

Author Topic: Importing street addresses in street_number street_name format  (Read 4243 times)

Erich

  • I post occasionally
  • **
  • Posts: 84
  • Karma: 1
Importing street addresses in street_number street_name format
June 01, 2010, 10:10:49 pm
Back in July someone posted the following:

Quote from: MKorostoff on July 12, 2009, 12:21:03 pm
Hello Friends,

I work for a political group that does a good deal of canvasing.  We need to store our addresses with separate House #s and Street Names so that we can properly sort walk on a street by street basis.  For that purpose, the single string street address field currently employed by civiCRM is insufficient.
...

I, too, need to be able to generate walk lists on a per-street basis, and was pleased to find fields for street_name, street_number, etc. in the civicrm_address table.  Needless to say, I was dismayed to find that I could not import data into these fields :-(

What is the recommended way to populate these fields?

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: Importing street addresses in street_number street_name format
June 02, 2010, 06:25:54 am

v3.1 and later has address parsing built in and is a configurable option:

http://drupal.demo.civicrm.org/civicrm/admin/setting/preferences/address&reset=1

In the Address Editing block

There is also a script: bin/UpdateAddress.php in the distribution that will go in and parse all the addresses in your DB

I dont remember if import does parse street address if the option is enabled, you might want to do a few test imports and check

If you are using CiviCRM for canvassing/GOTV you might want to consider supporting this project

http://wiki.civicrm.org/confluence/display/CRM/CiviCRM+for+Canvassing+and+GOTV

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

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Importing street addresses in street_number street_name format
June 02, 2010, 07:02:11 am
Lobo,
I like the feature! However, it expects the US/UK format of 21 Ambachtstraat. In The Netherlands we do it the other way around, so street name first...(Ambachtstraat 21) and I think it is the same in some countries. I think this should be a localization setting, or the possibilty to set it in address formats. If you agree I will undertake to adapt is, if not I will make a customisation for The Netherlands that I will share.
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

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: Importing street addresses in street_number street_name format
June 02, 2010, 07:07:58 am

Erik:

yes that needs to be a localization setting, i.e. both the parsing algorithm and the layout of the boxes need to be influenced by the locale

if you can work on it and make it general that would be great

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

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Importing street addresses in street_number street_name format
June 02, 2010, 07:11:32 am
I'll schedule it for middle this month, and find you in the IRC if I get stuck.....:-)
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Importing street addresses in street_number street_name format
June 09, 2010, 02:20:33 am
In my idea the localization template would look like the attached picture.
As far as the data is concerned, I am planning to add a colum (street_parsing_options) to the table civicrm_preferences, with the three possible options. The record with contact_id 1 (the admin) will then hold the choice for the admin/website. Does that make sense?

« Last Edit: June 09, 2010, 02:50:16 am by Erik Hommel »
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

daybell

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
    • Vermont Progressive Party
  • CiviCRM version: 4.1.5
  • CMS version: Drupal 6.26
  • MySQL version: 5.5.22
Re: Importing street addresses in street_number street_name format
December 03, 2010, 10:33:41 am
Quote from: Donald Lobo on June 02, 2010, 06:25:54 am

I dont remember if import does parse street address if the option is enabled, you might want to do a few test imports and check


Import does parse street addresses if that option is enabled, and doesn't if it isn't.  It would be great if it could be left on, but have an option at step 1 of import contacts (in the import options area) to turn off address parsing for that import only.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Importing street addresses in street_number street_name format
December 03, 2010, 10:59:18 am
Sounds like a nice job for the Xmas holiday. I expect to do it in steps:
* step one: introduce the setting and take care of the localization in CRM_Core_DAO_Address (will be done before 1st Jan)
* step two: see what we can do in the import (probably in Feb)
Erik

Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Importing street addresses in street_number street_name format
December 05, 2010, 10:29:06 pm
If my memory serves me right.

On enabling 'Street Address Parsing' option.

On import if you pass valid Street Address String, import process will parse in to

1. street_name
2. street_unit
3. street_number
4. street_number_suffix

In case passed street address string is not parse able, import will give you warning status message.

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) »
  • Importing street addresses in street_number street_name format

This forum was archived on 2017-11-26.