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) »
  • Primary & Work Address Import Process
Pages: [1]

Author Topic: Primary & Work Address Import Process  (Read 1534 times)

photolimo

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.0.67
  • PHP version: 5.2.5
Primary & Work Address Import Process
April 26, 2011, 07:40:43 am
I am looking to import 700 contacts that all have Primary and Work address'. I found some useful documentation here http://wiki.civicrm.org/confluence/display/CRMDOC40/Swapping+primary+addresses+in+CiviCRM but it is still a bit ambiguous to me how to use this method.

What is fn and ln?

This sentence is very confusing: (taken from the documentation link above)
Quote
So say for example a bunch of people have home as their primary but you want to make it work = primary then you would have to export all those contacts (both addresses) then swap the columns to the order of primary = first column group. For example you just exported a bunch of contacts and want to make sure the primary address is work your import would look like this.

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Primary & Work Address Import Process
April 26, 2011, 10:54:19 am
fn = first name ln= last name

Basically I understand this to be the rule:

First address brought in becomes the primary.

Forst instance my exported db flagged a column called primary and set a true/false value to it and then I can sort it in excel so that all my TRUE imports are first and the FALSE are second.

The additional part to know here is the following:

Any address type (work, main, home) changes requires a new csv file or sql query. The first import will become primary and the rest are just additional addresses.

TIP: When importing make sure you are using the CORRECT import method (Update, Fill, No Dupe Checking)  this will also determine the results.  For instance, Update would take the second address and replace the first address thus not creating a new address.  Fill would add info to the address and not create a new one.  Most of the time, the best results will come from a division of both address type, sorting and import method.  Hope that helps.  Took me about 3 days to wrap my head around all the facets of importing data and how it all works.  The book could definitely dive deep into this.  I am hoping that I can make some videos to share of my importing experiences and what results are like based on my testing.  I even found myself having to delete table rows inside MySQL Workbench when imports go wrong.  :)
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Primary & Work Address Import Process
April 26, 2011, 12:37:50 pm
One other comment.  When importing I could not find a way to override the information with new information using Update function if the new information was a null input.  In otherwords, I imported the address fields with Update instead of no duplicates when it comes to multiple "work" addresses. For instance I had an entry where the second address had an additional1address line and when using update to rerun the original primary addresses it did not remove the additionaladdress line and make it blank to match the record, it left it there.  Thus creating a hybrid address of the first dataset values and the second dataset values.  I had to delete those fields manually.  This would make a really good import addition to the Update task since I believe this was intended as such.  I will be sending a bug report to the appropriate location on this to see if I am right or wrong in this idea.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

photolimo

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.0.67
  • PHP version: 5.2.5
Re: Primary & Work Address Import Process
April 26, 2011, 12:49:07 pm
It would also be great to update the documentation since it is not very clear or thorough.

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Primary & Work Address Import Process
April 26, 2011, 12:58:31 pm
I really think it would be a very LONG update to get all the scenarios in play with a rewrite. I would suggest that videos be made of scenario inputs that help to build a foundation of understanding in the features that are there.  Much easier to see exaple sets of data going in.  For instance it took me forever to understand that the External Identifier field was a type set, meaning Organization could define it's own external ID outside of a individual ID one.  That helped tremendously in understanding where I should define those within my current data set.  Seeing how these actually work in a video would be the best as you can see the results without getting your db messy trying to figure the complexity of the import feature out.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Primary & Work Address Import Process
April 26, 2011, 01:05:46 pm
UPDATE: The "update" routine does appear to overwrite the values with blank if that field value is empty.  I guess it was just a fluke that I had a couple not update after double checking my records.  Sorry for any confusion on this.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

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: Primary & Work Address Import Process
April 26, 2011, 01:14:13 pm

nasact:

would be great if you can help contribute some screencast / videos and do a walk thru of import with various scenarios

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

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Primary & Work Address Import Process
April 26, 2011, 01:24:45 pm
Would be be happy to.  Once I complete my import and gain a REAL grasp on the routines.  I am seeing various small quirks about imports that I am slowly understanding what is going on. Seems the documentation might be misleading if my theories are correct.  Please see my post about phone number imports.  I hope to master this import thing and give back by the end of next week.  Will need to get permission to share the videos as they may have private information but I can always create a fake set of data for each type based on what I am doing. I am working on import mappings for GoMembers software.  That is the Trak Access DB system.  So if anyone needs help with that specifically I can give some advice on it.  Just PM me with a question.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Primary & Work Address Import Process
April 26, 2011, 01:53:48 pm
In case it helps with the original question - you need different columns for each part of the address - and different ones for each Location type eg Work v Home. eg
Street (home)
City (home)
Postcode (home)
Country (home)
Street (Work)
City (work)
Postcode (work)
Country (work)

So if you import the above 'home' will be the primary address because it was an earlier column than Work.
So if you have some people you want to have 'home' as primary, and others where 'work' should be primary, then you should split your table and do two imports, reversing the sets of fields for the second one.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Primary & Work Address Import Process
April 26, 2011, 02:21:57 pm
I am confused by this as I get the exact opposite results.  The second item work becomes primary address and the first doesn't.  I get the same results when doing phone numbers as well.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Primary & Work Address Import Process
April 26, 2011, 02:49:17 pm
I havent done such an import for quite a while so maybe something has changed - or my memory is failing - but this post suggests that was how it was working in past http://forum.civicrm.org/index.php?topic=5537.0
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Primary & Work Address Import Process

This forum was archived on 2017-11-26.