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) »
  • How to BLANK an address field...
Pages: [1]

Author Topic: How to BLANK an address field...  (Read 2473 times)

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
How to BLANK an address field...
November 24, 2008, 07:05:08 am
If you import contacts whose addresses have changes (so import update) there is a big problem with blanking lines.
For example
Contact X had address Main as
Address field 1 PO Box
Address field 2 Street name
Address field 3 APT 5
But now this Main Address area was update as
Address field 1 Street
Address field 2 and 3 blank cause they moved and the new address does not need these.
But when you import this new address it does not BLANK the other fields.
Almost like the code should consider if blank then blank the related field it was matched to in the imports?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: How to BLANK an address field...
November 24, 2008, 09:38:37 am
Are you using "Update" or "Fill" mode in the import? "Update" should do what you want - "Fill" only "adds data".
Protect your investment in CiviCRM by  becoming a Member!

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: How to BLANK an address field...
November 24, 2008, 09:56:15 am
I've tested update on the sandbox and it does not work
http://sandbox.civicrm.org/civicrm/contact/view?reset=1&cid=103
This is the record I tested
I saved the import as a template called "Blanking Address"
And attached is the csv I tested with.
Thanks

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: How to BLANK an address field...
November 24, 2008, 02:41:01 pm

I dont think import knows how to blank out various record lines. I think there is an issue for this.  We'll try to fix this when we work on import in a future release

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

pat.gardner

  • Guest
Re: How to BLANK an address field...
July 01, 2010, 06:43:02 pm
My apologies for reviving an otherwise dead topic, but this still seems to be an issue even in the current sandbox. I noticed that the associated bug described in the tracker here doesn't seem to have anything happening with it.

Is there any other related work happening on the import contact process that might be worth looking at if we were interested in having a look into this part of the code?

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: How to BLANK an address field...
July 01, 2010, 09:25:02 pm

no major work is being done on import currently

I think to "force" the reset of an address explicitly, might be easier to pass it as an import option (and then send it all the way down to):

CRM/Core/BAO/Address.php

and basically modify the behavior of the function dataExists

basically depending on your use case in some scenarios, u do want it reset and in others u'll want tor retain the old address. hence the option. contact us on IRC if u'd like more help etc

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) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • How to BLANK an address field...

This forum was archived on 2017-11-26.