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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • extending address table?
Pages: [1]

Author Topic: extending address table?  (Read 827 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
extending address table?
May 12, 2009, 05:13:17 am
There are official standards for addresses such as the one against which USPS addresses are checked. They tend to have civic addresses broken down into more specific fields, such as
  • apartment,
  • building number,
  • building number suffix,
  • street name,
  • street type,
  • street direction.
They may also specify supported formats for rural addresses of several types for different parts of the country, like Canada Post does. For example:
  • rural quarter,
  • rural section,
  • rural township,
  • rural range,
  • rural meridian,
or alternatively,
  • rural lot,
  • rural concession,
or again,
  • rural block,
  • rural plan,
  • rural reserve,

(Only one of the four formats above is valid at a time.)

While I could just use custom fields on a contact to extend the address like this, I would prefer to place these fields within the address fieldset so that they could take advantage of the functionality supporting multiple addresses and household addresses. I would also like to put a bit of custom code in to calculate CiviCRM's Street Address and Supplemental Address 1 and 2 fields from these fieldsets.

As an aside, this more standardized and finer resolution of address information allows for better and faster matching of potential duplicates based on address information, and for more automated translation as well as matching of addresses, as 500 Dundas St W can much more easily be translated into or matched with 500, rue Dundas O.

To do this I would like to add a new type of object, address, that can be extended by custom fields. Comments and suggestions welcome.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

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: extending address table?
May 12, 2009, 06:28:15 am

note that the address table already has columns for the first set of fields (apartment, building number ...)

they are currently not used

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • extending address table?

This forum was archived on 2017-11-26.