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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • [Options set] Import values of a custom set of options
Pages: [1]

Author Topic: [Options set] Import values of a custom set of options  (Read 342 times)

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
[Options set] Import values of a custom set of options
September 17, 2014, 05:07:13 am
Hello,

I'd like to know if this is possible to declare a new custom field with "select" as type (or any other type linked to a set of options), and to import the possible values of the set of options with a csv file instead of manually adding them one by one .

For example if I add a custom_group called "Studies" for contacts, with a "select" field named "School", I'd like to be able to manage a list of schools in a set of options imported when creating the field (I've 300 different entries), instead of having a free text field.

Can anyone advise please ?

Thanks

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: [Options set] Import values of a custom set of options
September 17, 2014, 08:19:11 am
I would use an API import!

You can do it via the GUI: https://civicrm.org/extensions/api-csv-import-gui
or the command line: https://civicrm.org/blogs/xavier/api_batch_tools
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: [Options set] Import values of a custom set of options
September 17, 2014, 09:40:22 am
Thanks Jon

However, the extension leads me to a blank page when accessing it from the menu (API csv Import) with this message

Quote
http://localhost/wprc/wp-admin/admin.php?page=CiviCRM&q=csvimporter/import : Merci de faire de WordPress votre outil de création. Version 4.0

And the command line method is a bit too complicated for a newby like me...
I'll trying to import the field directly in the DB...

FYI : I'm testing 4.5b9 on WP4.0

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: [Options set] Import values of a custom set of options
September 17, 2014, 12:14:28 pm
if API isn't firing for some reason in past i have done this with an 'insert' in to the civicrm_option_value table

generally would make the option_group and first value via the UI

Then look at db, grab that row, put in spreadsheet and do whatever is required to replicate the constant values eg option_group_id etc

then import in to the db

but nothing in the UI for doing this

there would need to be a 'lot' of options to be worth doing though ;-)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: [Options set] Import values of a custom set of options
September 18, 2014, 12:40:10 am
Thanks Peter,
This was exactly my first thought about how to proceed.
 :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • [Options set] Import values of a custom set of options

This forum was archived on 2017-11-26.