How is CiviCRM data imported into Drupal?

wonder95 - February 20, 2008 - 05:01
Project:CiviNode And Civinode CCK
Version:5.x-1.2
Component:CCK Integration
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Call me stupid, but I'm still trying to figure out how to get my CiviCRM data into Drupal so I can use a view to display a list in a block. There are two fields in my Individual contacts in CiviCRM that I want to display: Employer (a custom data fields since there are bigs with Current Employer), and State (Work). So I create a content type and add employer and state fields. What do I do now? How does the data get pulled over from CiviCRM? Do I have to manually create a new node of this content type for each contact?

Also, when I go to create content, each of my fields are listed three times instead of just once each.

#1

yurtboy - February 22, 2008 - 11:19

I think you could go about it more easily this way.
1. Create a civi profile for the fields
2. Go to the content type and add the cck civinode for those fields
3. Now when you create that content type you get fields to auto pull from those area.
4. When you create a view choose the Civi field that you want then choose "Profile" then the profile ID.
So you really are not importing data you are pulling data from it.
If your goal is to get the above data INTO civi then you may just want to create a form with the above profile and use that?
There are lots of options so if you want to go into more detail of your goals please write back.

#2

wonder95 - February 24, 2008 - 05:03

I actually already have two CiviCRM profiles that have these two fields in them. There are already about 50 contacts entered in CiviCRM (and Drupal) with data in these fields. Do I have to create one node of my content type for each contact?

As I said above, I created a custom data field in CiviCRM called Employer. I want that and the State (Individual)(Work) field for each contact in two different CiviCRM smart groups. I created a new content type called civicrm_contact, and added two fields using the CiviCRM Contact CCK widget provided by civinode (using the Contact Autocompleter). I called them 'employer' and 'state', and set the default group and profile options.

When I go to create a node, all I see is the Title, and then each field displayed three times (that seems like a bug to me). None of the fields have the multiselect capability; they're all just text fields. Exactly how is the CiviCRM data supposed to be pulled over?

 
 

Drupal is a registered trademark of Dries Buytaert.