3

I have created a civicrm custom dropdown field in Drupal 7. I have a excel spreadsheet contains some data in three columns. To which i need to import into civicrm and then the first column should be display in the custom dropdown field.

So, i have two opinions at this stage

1) I can create a custom table for Civicrm and then import the values from spreadsheet. OR

2) I can create taxonomies terms having 3 fields in Drupal.

After, that it should show it's values in the civicrm's custom dropdown field.

But i couldn't able to find out the correct way to implement any of the approaches. Please suggest me the steps to implement either of those approaches or any new approach which will be quite easy to implement.

  • Is there a reason you aren't using the CiviCRM import features? – Nicholai May 23 '15 at 13:57
  • Could you explain a bit more about what the three columns of data are about, and what kind of custom fields you are intending to store them in in CiviCRM? Are they like tags on a contact?? For example, is the first column a tag/taxonomy term, and the next two unique identifiers for a contact? – Joe Murray May 25 '15 at 1:08
  • Rereading your question I wonder if you mean to say that the first column is actually a Drupal dropdown field that you want to use on CiviCRM objects, for example by making them Drupal fields.0 – Joe Murray May 25 '15 at 1:16
  • The field is civicrm custom field (created from backend) and not the Drupal field. The table in which we have three columns is just related to a 'Medicine's informations'. To which we'll use to assign medicines to different contacts of the Civicrm. So, its just like tagging the contacts with medicine's data. But no column associated with unique contact in that table. – Juyal Jee May 26 '15 at 5:09
1

You should describe more these 3 columns as it's not clear what type they are and how you need to use them, but I would create them as either options on a custom field or as tags

tags have 2 "usable" columns (the name and a description), optionvalues have 4 (label, value, name, description)

you can import them from the command line using the api or use an extension.

  • Okay, I can explain again if there is any doubt remaining. You can consider the table as any ordinary table. Which is having three columns regarding (id, title, description). And i know how to import the table in drupal. The main question is how can we show the 'title' from that table into our civicrm dropdown field. – Juyal Jee Jun 3 '15 at 16:02
  • I would recommend you to use the existing tool, check how tag or custom fields work, and import your data into either civicrm_tag or civicrm_option_value and it will work out of the box – Xavier Jun 3 '15 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.