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) »
  • Newbie question about importing event information
Pages: [1]

Author Topic: Newbie question about importing event information  (Read 1337 times)

tterrill

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.18
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Newbie question about importing event information
May 01, 2013, 07:52:02 am
After importing a spreadsheet of event attendees, my boss asked if I could also import past event information. Mostly the status of whether the person attended a past event or not. I'm assuming these are internal fields in CiviCRM. My question is: Is it possible to import past event information? I specially want this information to be in the fields such that any activity report of past event attendees will include this uploaded information.

Thanks!

Thane

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Newbie question about importing event information
May 05, 2013, 08:02:38 am
There was code here http://wiki.civicrm.org/confluence/display/CRMDOC40/Importing+Events but it's outdated I think.

Seems it would have to be done via custom code, using the API.
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.

tterrill

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.18
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Newbie question about importing event information
May 06, 2013, 09:20:05 am
Thank you. While I'm not sure I want to fool around with php code, it's very helpful to know what it takes and that it is possible. We don't have that much historic information, so for us, I think we'll type it in.

Thanks again!

Thane

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: Newbie question about importing event information
May 06, 2013, 02:32:03 pm
Hi Thane,

For what it's worth - this code certainly simplifies the process, but I'm reasonably sure you'd be able to import events, and activities tied to those events, with the command-line import tools: http://civicrm.org/blogs/xavier/api_batch_tools

In fact, importing events is pretty straightforward with the command line tools if you're comfortable with CSV files (and the command line of course!).  You can export your existing events, and write your new events to a CSV to match that format.  Lots of the code in the script Hershel references is for the API v2, which was more cumbersome - you wouldn't need most of that today.

Importing the participants is trickier - the issue is lookups.  You couldn't import activities by the event's name or the contact's name - you'd have to look up the event ID and the contact ID and put those in your CSV.  The PHP is what simplifies all this - it does the lookups for you.

That said - if you're comfortable with databases (especially SQL) but not PHP, you could write the lookups yourself.  Alternatively, if you're not comfortable with PHP or SQL, but like spreadsheet software like Microsoft Excel or LibreOffice Calc just fine, and know how to write lookup formulas - you could export your contacts and your events to CSV, then write lookup formulas in your spreadsheet formula.

More cumbersome - sure.  But then you don't need to know PHP or SQL.
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) »
  • Newbie question about importing event information

This forum was archived on 2017-11-26.