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 Import (Moderator: Yashodha Chaku) »
  • Valid characters in import data
Pages: [1]

Author Topic: Valid characters in import data  (Read 937 times)

mcarson

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 5
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5
  • PHP version: 5.4.22
Valid characters in import data
June 27, 2010, 12:14:31 am
I failed to properly estimate the amount of time it has taken to migrate data into CiviCRM; deduping, de-normalising.

I have almost completed all the required data migration using the various import wizards and, luck for me, left the 'more complex' data till this point.

I have created a few custom data fields in CiviCRM to store 'Notes' and 'History' fields previously stored in Excel. Due to the lack of advanced filtering and query functionality, I migrated all data into Access and performed 'mapping' of the legacy data fields to CiviCRM fields.
These two 'Notes' and 'History' fields have a Microsoft Access datatype of Memo and the length of the contents range from 120 to over 900. In CiviCRM, I created the custom data fields and set the length to 2000 (just in case) and, receiving no warnings about maximum length, I assumed this was okay.

Within the memo fields, after replacing some 'unusual characters', I replaced CRLF (13)(10) with LF assuming that CRLF would not be supported in CiviCRM/MySQL. I attempted the import, and although some data was imported it was truncated and some other fields were missing.

I attempted the import again, replacing the CRLF with \n and \r\n respectively. Both these imports do not get to step 2.

Can someone advise me of:

  • What is the maximum length supported by the custom field 'alphanumeric' datatype in CiviCRM?
  • How can I import a 'newline' character into a Custom field?

Thanks in advance.
“Anyone who has never made a mistake has never tried anything new.” - Albert Einstein
"If you are travelling at the speed of light and you turn on your headlights, would they work?" - Unknown

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Re: Valid characters in import data
June 28, 2010, 06:45:52 am
Quote
What is the maximum length supported by the custom field 'alphanumeric' datatype in CiviCRM?

alphanumeric refers to the varchar data type in MySQL which can hold up to 255 characters,
note refers to text data type in MySQL which can hold up much much much more but it's not the most efficient storage.

Quote
How can I import a 'newline' character into a Custom field?

I have no idea on this one but will try to get back to you if I can

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Valid characters in import data
June 28, 2010, 08:06:58 am
Hi,

If you got complex stuff you want to import, I found myself developing custom scripts of a few lines that use the api instead of massaging my csv files more efficient.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Valid characters in import data

This forum was archived on 2017-11-26.