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 multiple relationships
Pages: [1]

Author Topic: Importing multiple relationships  (Read 1828 times)

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Importing multiple relationships
May 29, 2012, 10:47:03 pm
I am working on importing lots of contacts into a new CiviCRM installation.  Many of the contacts have multiple relationships.

I assumed that I would be able to do this by importing each contact once for each relationship, by using either the update or fill options on the update. However that isn't working.  The first import sets the first relationship of course, but it appears that the following imports are not setting new relationships.

I have not selected any of the dedupe options.
« Last Edit: May 29, 2012, 10:48:35 pm by robbrandt »

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Importing multiple relationships
May 30, 2012, 10:38:07 am
Hi Rob,

You may want to consider using the command-line tools if you're importing "lots" of contacts.  However, I've successfully imported multiple relationships per contact.  Unfortunately, as you've noticed, you can only import one relationship type at a time.

So, having been reassured that it CAN be done, let's figure out why it's not working for you. 

* Can you update/fill ANY fields?  I wonder if the fields you're importing aren't triggering the duplicate rule.

* you say, "I have not selected any of the dedupe options" - do you mean you haven't selected "For Duplicate Contacts - Skip, Update, Fill, No Duplicate Checking"?  I assumed that's what you meant, but it conflicts with what you said earlier.  Do you mean that you haven't changed the dedupe rules?
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Importing multiple relationships
May 30, 2012, 10:42:38 am
Thanks.

I am unfamiliar with the command line tools.

What I meant was, that I have selected either "Update" or "Fill", but not made a selection for the dedupe rule checking like fuzzy and strict.  I really don't know the effect of each one and hoped that it would use a reasonable default.  Since it's not a required selection.

The data I am importing is really, really simple BTW.  First name, last name, email address, and relationships.

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: Importing multiple relationships
May 30, 2012, 01:22:16 pm
hi Rob - have a look under your menu under Contacts - Find and Match Duplicates - that shows you the default Strict rule that will be used if you don't select one.

Are you creating relationships between contacts already in the DB using their Internal ID - or are you trying to add people as you import them.

I would expect an import to be able to do the following with cols
First
Last
Email
Employer of (column would have Org Name or Int ID or Ext ID)
Club of (column would have Org Name or Int ID or Ext ID)
Father of (column would have Int ID or Ext ID)
Mother of (column would have Int ID or Ext ID)
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

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Importing multiple relationships
May 30, 2012, 01:35:32 pm
Thanks. "Individual Fuzzy In-built" is the default.

The ones that are failing are contacts that already exist.  The first import and it's relationship works perfectly.  Subsequent imports - meant only to add a relationship - fail.  I have a giant table in excel with thousands of contacts, none of which existed in CiviCRM prior to this import. So the Excel table doesn't have IDs.  I had previously noted that CiviCRM handles "updates" just fine, and so figured that the additional relationship would be handled as well.

To use your example, my data looks like this:

First
Last
Email
Employer of (Org Name)

that works.  Subsequent imports of the same contact would look like this:

First
Last
Email
Club of (Org Name)

The Org Name would be the same in both imports.  In other words, a contact will have multiple relationships with the same Org.

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: Importing multiple relationships
May 30, 2012, 02:24:07 pm
would have been helpful to have given all your contacts an External ID prior to first import - too late to add that?
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

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Importing multiple relationships
May 30, 2012, 02:33:22 pm
I would really, really prefer to avoid that.  There are thousands, they exist only in the Excel sheet, and they are duplicated for each relationship.  I can't think of how to do that quickly.

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: Importing multiple relationships
May 30, 2012, 02:38:26 pm
Quote from: robbrandt on May 30, 2012, 01:35:32 pm
Thanks. "Individual Fuzzy In-built" is the default.

My data looks like this:

First
Last
Email
Employer of (Org Name)

that works.  Subsequent imports of the same contact would look like this:

First
Last
Email
Club of (Org Name)

The Org Name would be the same in both imports.  In other words, a contact will have multiple relationships with the same Org.

Default as in at the Import screen?? There should be a default Strict and a default Fuzzy - and it should be the default Strict that is used for an Import afaik if you don't select one.

Beyond that I don't understand why your subsequent import of

Quote
First
Last
Email
(Relationship is) Club of (Org Name)

Would fail to add the 'club of' relationship to your contact.
« Last Edit: May 30, 2012, 02:42:24 pm by petednz »
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

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Importing multiple relationships
May 30, 2012, 02:41:01 pm
Thanks, I'll try the strict option tomorrow and see if it works.  For some reason it is the fuzzy one that's set as the default; I wouldn't have changed anything here on this brand new install without better understanding what it does.

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Importing multiple relationships
May 30, 2012, 11:40:51 pm
Here are the results...

Using Fill/Individual Strict, I get the same results are previously; no new relationship

Using Fill/Individual Complete, I get a new (duplicate) contact with the new relationship

using Update/Individual Complete, I get a new (duplicate) contact with the new relationship

so still not the results I need.

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: Importing multiple relationships
May 31, 2012, 12:02:21 am
I think you need to be using Update

Pls add a screenshot of your import screen 2 just prior to submitting
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

robbrandt

  • I post occasionally
  • **
  • Posts: 89
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal
  • MySQL version: 5.1.41-3ubuntu12.9
  • PHP version: 5.3.6
Re: Importing multiple relationships
May 31, 2012, 10:26:25 pm
I think I have it working.  I am using Update/Strict.  But it was still failing until I deleted some columns that were supposed to be ignored.  The original data had a userID column however the IDs weren't useful as the duplicate contacts didn't have the same user id.  The import was set to Do Not Import in the import, but apparently they are still used.  Once I deleted those columns the import worked fine.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Importing multiple relationships

This forum was archived on 2017-11-26.