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) »
  • csv and blank fields in custom data group - can we get a comma for each field
Pages: [1]

Author Topic: csv and blank fields in custom data group - can we get a comma for each field  (Read 1159 times)

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
csv and blank fields in custom data group - can we get a comma for each field
May 05, 2008, 02:53:04 pm
I may be suffering from brain fog as was sure i had posted this but can't find it via searching.

(Edit - hah just found it http://forum.civicrm.org/index.php/topic,2002.msg13730.html#msg13730 and I got an answer from dave that focussed on the Price Set issue rather than the comma issue, and not sure i explained it well so here goes a second time)

when exporting a multichoice field, civiCRM puts all the data fields/choices that have data in them in to one cell separated by commas - which we understand, but it doesn't put in a comma for each and every choice.

Is it possible this can be reconfigured so that it exports a comma to represent any multichoices that are unchecked - ie for multi choice where a contact has the following information (have used x to indicate selected)

option1 x
option2
option3 x

(ie they have a check against option 1 and 3 but not two)

we currently get (option1,option3)

would be much better for then breaking the data in to columns in spreadsheets if we get an extra ',' representing the null option2 ie we would get
(option1,,option3)

Does that make sense? Should I put this in a separate thread?
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

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: csv and blank fields in custom data group - can we get a comma for each field
May 05, 2008, 05:32:43 pm

yes, this makes sense, but will require a code change. I can potentially show chris where the code is tomorrow and maybe he could try and contribute a patch

not sure if other non-savvy excel/csv folks will appreciate the change. so not sure if this should be part of core.

would it be easier to replicate this with a smart excel macro? (i..e given an array of options in the right order, reformat a given string?)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

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: csv and blank fields in custom data group - can we get a comma for each fiel
May 05, 2008, 05:40:40 pm
I think that being able to export in this format then makes it easier to make changes in the excel and reimport it without losing already existing data. Yes we have already used a vLookup or somesuch as a workaround, but felt I should explore this with your team as I think it gets over a significant hurdle when exporting multichoice custom data, given that we can export it as one column per multichoice option. This is the next best option we can see.
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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: csv and blank fields in custom data group - can we get a comma for each fiel
May 06, 2008, 03:56:13 am
Wondering if the "right" solution here is to export a column for each multi-choice option...

Favorite Color: [ x ] Red   [  ] Blue   [ x ] Green

Exports as:

Favorite Color, Favorite Color, Favorite Color
Red,,Green

Thoughts??
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • csv and blank fields in custom data group - can we get a comma for each field

This forum was archived on 2017-11-26.