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) »
  • Shared address with
Pages: [1]

Author Topic: Shared address with  (Read 11533 times)

civc12

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 2
  • CMS version: 6.0
  • MySQL version: 5
  • PHP version: 5
Shared address with
April 09, 2012, 10:53:57 am
I need to import 5000+ contacts  with shared address with employer. When I ever import my contact I always use "employee of" is there a way to import the contact with shared contacts with an organization?

satchmo

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
    • Flying Horse Tech
  • CiviCRM version: 41
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Shared address with
April 09, 2012, 10:58:12 am
I'm not sure what you're getting at. Using "employee of" is the best way to say that someone works for an organization. You can optionally use the Groups or Tags features in Civi as well.
“After one look at this planet any visitor from outer space would say ''I want to see the manager.''” - William S. Burroughs

civc12

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 2
  • CMS version: 6.0
  • MySQL version: 5
  • PHP version: 5
Re: Shared address with
April 10, 2012, 09:53:08 am
there is a checkbox in the address field in individual named "SHARE ADDRESS". How do I get this field in the import option.....
 
I need to to use an import function that allows me to share address with employer.
So If the employer changes the address the employee address also changes at the same time.

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: Shared address with
April 10, 2012, 10:56:32 am

Pretty sure that the "share address with" functionality has not been exposed to the import script

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

civc12

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 2
  • CMS version: 6.0
  • MySQL version: 5
  • PHP version: 5
Re: Shared address with
April 10, 2012, 02:26:30 pm
is there a way to get around this?

websynapse

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 3
    • Ryan Kennedy
  • CiviCRM version: 4.3.7
  • CMS version: Drupal 6
Re: Shared address with
October 03, 2012, 08:08:18 pm
Did you ever find a way to get around this? I'm also doing mass imports and it's pretty tedious to go in and click 'Share address' for every contact.

Gorentz

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: WordPress
  • MySQL version: 5.5.21
  • PHP version: 5.3.10
Re: Shared address with
March 14, 2013, 09:44:18 pm
I'm interested in this, too.  If I can't do it through the import functions, how could I go about doing it through sql?  What fields need to be updated. It looks tricky, because it looks like a copy of the address is made (in civicrm_address) for each contact that is sharing an address from another contact.

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: Shared address with
March 15, 2013, 10:54:30 am

One option might be to enable mysql query logging and see the queries generated by civicrm, specifically the update and insert queries. That will give you  good idea on whats involved in doing this directly via sql

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

ayduns

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 6
    • Squiffle Consulting
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7
Re: Shared address with
June 13, 2013, 04:36:33 pm
Is the api useful here to script something?

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: Shared address with
July 20, 2013, 08:19:07 am
For other folks looking for a solution to this - I accomplished this via the API, specifically using the import/export tools in /civicrmroot/bin/csv/.  However, this was possible because I used Pentaho Kettle (an open source ETL tool), which has a learning curve - though you can do it via SQL as well.  I'll share my Kettle transformation if folks want - but the general approach is the same as any API import.  Two tricks:
* Use the "master_id" field to tie the imported address to the address being shared.
* Import the normal address fields anyway, or the shared address won't appear until you edit/resave the contact.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

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

This forum was archived on 2017-11-26.