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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Importing Preferred communication method problems
Pages: [1]

Author Topic: Importing Preferred communication method problems  (Read 3540 times)

Tonyf

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
Importing Preferred communication method problems
November 17, 2008, 02:48:59 am
After importing individuals from a custom access database I have been using for many years, I forgot to import Preferred communication method.  So I did a second import using the fill option, and this worked except where I wanted to tick more than one preferred communication method e.g. Email and Postal Mail.  The rows with this information (as a comma delimited list surrounded by double quotes (e.g. "Email, Postal Mail"), which is the way this information exports) resulted in a Rows with Errors message in the preview window, and the download errors list showed the error as "Invalid value for field(s) : Preferred Communication Method". 

How should I format Preferred Communication Method for import when it includes more than one item?

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: Importing Preferred communication method problems
November 17, 2008, 11:08:44 am
Did you try it with just the comma ie field would show -   email,Postal Mail   ?
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

Tonyf

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
Re: Importing Preferred communication method problems
November 19, 2008, 01:53:58 am
Yes I've tried it without quotes.  The import uses a comma separated value list with the commas used to separate fields.  So taking away the quotes means that the import interprets email,Postal Mail as two separate fields, not as a comma separated list to go into the one field.  Usually this is dealt with by putting text like this within quotes, but this doesn't seem to be working either.  Any other ideas?

Tony.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Importing Preferred communication method problems
November 19, 2008, 11:17:50 am
I think this is a bug - you should be able to import a double-quote delimited column with comma separate option values. I've posted an issue for 2.2 to fix this:

http://issues.civicrm.org/jira/browse/CRM-3849

Don't know of a good work-around for this in 2.1 - other than writing to the DB directly. Someone else might chime in here w/ a better workaround ??
Protect your investment in CiviCRM by  becoming a Member!

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: Importing Preferred communication method problems
November 19, 2008, 01:44:26 pm
Try it without the 'space' ie "Email,SMS" not "Email, SMS"
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: Importing Preferred communication method problems
November 19, 2008, 04:30:42 pm
Peter - you've tried that and it works? If so I get dummy points. I think we probably should still fix things so the format that we export works on import (given your apt advice to many folks to use that as a model). :-)
Protect your investment in CiviCRM by  becoming a Member!

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: Importing Preferred communication method problems
November 19, 2008, 04:53:23 pm
Well it worked for me. Couldn't see why it wasn't behaving. So tried single 'phone' then 'email' then 'sms' - then tried "email,sms" and bingo
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

Tonyf

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
Re: Importing Preferred communication method problems
November 20, 2008, 06:54:08 pm
Yep, works for me too!  Thanks Peter.   :)

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: Importing Preferred communication method problems
November 20, 2008, 06:58:10 pm
Phew. My advice seems to have been a bit hit-and-miss recently. Glad I lined this one up properly.
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

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: Importing Preferred communication method problems
December 03, 2008, 12:31:37 pm
yes, thanks for the tip. Unfortunately, it only works for new import records, not for updates.

I can see the code that tests for valid input in CRM/Parser/Import/Contact.php, which is consistent with your observation (i.e. it splits the input with a comma and tests each value against valid values).

But I can't see where the import code actually stores the values (and why it doesn't work when updating).

I guess I'll have to fix my import process to be able to do it in the first round ...

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Importing Preferred communication method problems
December 03, 2008, 02:54:14 pm
Alan - I've added your observation as a comment to an existing issue which is about fixing the trimming problem.

http://issues.civicrm.org/jira/browse/CRM-3849

Of course, if you wind up fixing one or both of these cases and can submit a patch - that would get things resolved sooner.
Protect your investment in CiviCRM by  becoming a Member!

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Importing Preferred communication method problems
February 13, 2009, 12:45:12 am
hi adixon

Now CRM-3849 is fixed, you will get patch from here

Quote
Unfortunately, it only works for new import records, not for updates.
After some code checking, I found that there was bug for update contact in import which was fixed in 2.1
here is issue : CRM-3111
patch for this issue is here

so v2.1 onward given patch for CRM-3849 should work for any import mode ( ie Skip, Update, Fill, No Duplicate Checking )

It seems like you are using v2.0 so It would be good If you take a look at given patches ( CRM-3111, CRM-3849 ) and test it across your environment.

thanks,
kiran
 
« Last Edit: February 13, 2009, 12:46:49 am by kiran »
You Are Designed To Choose... Defined By Choice.

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: Importing Preferred communication method problems
February 13, 2009, 05:16:59 am
Thanks for this. We've actually upgraded to 2.1 in the interim so I can't test your patch on that site. If I do any more imports on other 2.0 sites, i'll try it out.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Importing Preferred communication method problems

This forum was archived on 2017-11-26.