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 Event Participant & Contribute Records at Same Time?
Pages: [1]

Author Topic: Importing Event Participant & Contribute Records at Same Time?  (Read 834 times)

annaleevk

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 3
  • Carpe Noctem!
    • Women in Development, New York
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.48
  • PHP version: 5.2.14
Importing Event Participant & Contribute Records at Same Time?
June 19, 2011, 11:48:04 am
Hi!  Am in the midst of a database conversion and I'm wondering if there is any way to import participant records AND create their corresponding contribute records at the same time?  I don't see anything in the Import Participants or Import Contributions which lets me enter the key between the records.

Via the admin interface, I manually added an event transaction and applied the payment to see what records were created in what tables.  Need to confirm that if this has to be done via mysql are these the ONLY 3 tables that I need to update?

civicrm_contribute
civicrm_participant
civicrm_participant_payment

Would prefer a way to do this via the admin interface rather than SQL.  Just trying to figure out the best way to preserve these 8 years of history that I am converting into CiviCRM at the moment.  Please let me know if there is a way to do this.

Thanks,
Annalee
« Last Edit: June 19, 2011, 11:54:37 am by annaleevk »
Annalee Van Kleeck
Lyric Systems, LLC
201 951.8711
annalee@lyricsystems.com

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Importing Event Participant & Contribute Records at Same Time?
July 01, 2011, 11:14:58 pm
Sorry but I don't think you can use the Import feature of CiviCRM to simultaneously import Participant & Contribution records.  However, if your data is good enough, you could write a MySQL query to tie the Participant and Contribution records together in the civicrm_participant_payment table.

Or... you could add the name of the event into the 'source' field of the contribution.  It's not a formal tie between data, but it at least gives you some historical clue as to which event that particular $ event fee was for.
« Last Edit: July 01, 2011, 11:16:47 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

annaleevk

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 3
  • Carpe Noctem!
    • Women in Development, New York
  • CiviCRM version: 3.4.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.48
  • PHP version: 5.2.14
Re: Importing Event Participant & Contribute Records at Same Time?
July 04, 2011, 04:58:47 am
Thanks, Stoob.  What I ended up doing was to import the contribution & participant through the interface and  put a unique id in the transaction id field in the contribution record and the same unique id in the event source field of the participant record.  Once all of the contribute and participant records were in, I exported the civicrm_contribution & civicrm_participant tables out and put them in Access and matched them up to create my civicrm_participant_payment records. I created a file that exactly matched the table but left the ID column blank.  Then I used PhpMyAdmin to import the records into the table and voila! the participant & contribution record were matched up.  Had my data been pristine, I would have preferred running everything through mysql as my host has a 300 record limit on imports.
Annalee Van Kleeck
Lyric Systems, LLC
201 951.8711
annalee@lyricsystems.com

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Importing Event Participant & Contribute Records at Same Time?

This forum was archived on 2017-11-26.