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 (Moderator: Dave Greenberg) »
  • Batch Relationship Additions
Pages: [1]

Author Topic: Batch Relationship Additions  (Read 700 times)

libkuman

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
Batch Relationship Additions
June 12, 2012, 03:14:09 pm
I am working for a client who currently uses a Custom Data field to store the contact for an organization. The data field just stores a name plain text. I'd like to switch them to use a Relationship instead to an individual contact. My problem though is how i would create those relationships, In one case i have 8 thousand records that have this custom data field set so its not feasible to update them one by one. I however cannot find any way to batch add a relationship. Is there any way to say take the members of a group and apply the same relationship to them? Any other ways of doing this in a batch way?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Batch Relationship Additions
June 13, 2012, 06:59:06 am
Quote from: libkuman on June 12, 2012, 03:14:09 pm
Any other ways of doing this in a batch way?

There may be a better way, but you could write a PHP script to extract those names, look them up via the API and then use the API to create a relationship for each.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

libkuman

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
Re: Batch Relationship Additions
June 13, 2012, 08:46:46 am
Thanks, was afraid code was the only way.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Batch Relationship Additions

This forum was archived on 2017-11-26.