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) »
  • Import of relationships of individual to org creating empty orgs .
Pages: [1]

Author Topic: Import of relationships of individual to org creating empty orgs .  (Read 980 times)

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Import of relationships of individual to org creating empty orgs .
January 24, 2011, 12:22:37 am
Hi,

I am trying to do an import of organizations and individuals.  I have a custom relationship where individuals are "practice managers of" organizations.  Starting small, I've imported one organization and then am trying to import 18 individuals.  When I import the individuals the row that is "practice manager" gets its relationship set up correctly but I am getting 17 organizations with no details.  Do I have to tailor my import files to have only the rows that have a relationship in them?  From what I'm reading, I'm going to have to do the import for every relationship I have (there will be about 10-12) anyway as you can only import one relationship set anyway, but it also sounds like I'm going to have to create a different import file for every one?  Is this actually the case or am I missing something?

I'm thinking it's probably worth my while to go down the path documented in http://civicrm.org/blogs/admin/writing-custom-import-script in this case anyway because of the number of relationships, but knowing if I'm missing something above will help me make a decision one way or the other.

thanks,
Malks.

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: Import of relationships of individual to org creating empty orgs .
January 24, 2011, 11:33:22 am
If the Org is in the DB and you have that same Org name in your import Column then should do what you want. Check your Duplicate Matching rule for Org perhaps?
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

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Import of relationships of individual to org creating empty orgs .
January 24, 2011, 01:32:42 pm
Hi Pete,

Thanks for you reply.  I had a similar idea and checked the strict duplicate rule for organizations and it looks fine.  I don't think that is the issue as the organization that should be linked doesn't get duplicated.  It's not a show stopper I'm generating all my csv files off a script anyway so will just modify those, just a bit annoying.

Anthony.

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: Import of relationships of individual to org creating empty orgs .
January 24, 2011, 01:42:13 pm
Not clear i am following the problem then.

You have Org A and Org B in civicrm.

You import

Indiv C who is linked to Org A

Indiv D who is linked to Org A

Indiv E who is linked to Org B

Indiv F who is linked to Org B

What Orgs are being created as a result of the import if not another 2 x Org A and 2 x Org B?

Wondering if you have the import set up correctly.

Col A = First
Col B = Last name
Col C = Org name

so on Col C the import says 'relationship = Employee of + Organisation Name'
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

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Import of relationships of individual to org creating empty orgs .
January 24, 2011, 03:51:48 pm
I have:

Indiv G who is *not* linked to an Org.

For however many not linked individuals I have (17 in my test import) I get an Org created that is empty of any detail.  Anyone that is linked to an Org is correctly linked to that  Org and the Org is *not* duplicated.

My workaround is to make my import files not have any unlinked individuals which is not unreasonable.  I was following some other instructions that for multiple relationships you could use one file and use "- do not import -" but this doesn't seem to be the case.

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: Import of relationships of individual to org creating empty orgs .
January 24, 2011, 04:09:17 pm
yes agreed that if you are importing in order to create relationship you should ensure that all your rows are requiring a relationship to be made -otherwise the other end of the relationship gets constructed when you don't want it - so just split your import

file A = have relationship to create
file B = no relationships
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

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: Import of relationships of individual to org creating empty orgs .
January 24, 2011, 05:05:16 pm
Agreed, when I get a chance I might try and work out where to update or comment in the Wiki.  Just to follow up I was working to http://blogs.terrorware.com/geoff/2009/12/01/importing-relationships-into-civicrm/ which suggested you could avoid using multiple files but this doesn't work I think if there are blank relationships.

Thanks for your time.
Anthony.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import of relationships of individual to org creating empty orgs .

This forum was archived on 2017-11-26.