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) »
  • Import of Excel CSV - Inclusion of HASH
Pages: [1]

Author Topic: Import of Excel CSV - Inclusion of HASH  (Read 2178 times)

rscott7706

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Import of Excel CSV - Inclusion of HASH
November 17, 2011, 09:49:37 am
I am in the process of setting up a disaster assistance site, and have installed CIVICRM.

I want to import a fairly small (contacts) Excel CSV file.

In looking at several previous posts, I have come to the conclusion that:

1.  I can use Excel's rand function to populate the "Contact Hash" field.
     Source: http://forum.civicrm.org/index.php/topic,4179.msg42820.html#msg42820
     "yes, we only care about uniqueness. We use this hash in civimail and in profile when generating urls"

2.  There won't be a possible problem of CIVICRM duplicating a hash later on as it checks for existing values.
     Source: http://forum.civicrm.org/index.php/topic,4179.msg42820.html#msg42820 (same page as above).
     "the column (hash and external identifier) in the civicrm_contact table have a unique contraint against it. So the DB takes care of this for us"

As a "newbie", I just want to make sure that import of a CSV with the hash field populated will work fine on all functions required of it.
"hash in civimail and in profile when generating urls"

Thanks for your anticipated help!!

Ron  8)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Import of Excel CSV - Inclusion of HASH
November 17, 2011, 10:03:01 am
Hi,

Sorry, not sure I understood why you want to generate the hash yourself (as opposed of having civi generating it for you)

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

rscott7706

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Import of Excel CSV - Inclusion of HASH
November 17, 2011, 10:21:59 am
Will CIVICRM generate a hash upon upload of a CSV?  If so, I don't have to populate the hash field.

Ron  8)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Import of Excel CSV - Inclusion of HASH
November 17, 2011, 10:46:40 am
Well, we've imported ou fair share of contacts and have never bothered with the hash;)

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

rscott7706

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Import of Excel CSV - Inclusion of HASH
November 17, 2011, 11:02:18 am
Have you needed to use civimail or attempt to generating urls?

I don't know if I would ever need these functions, but as shown in my first post, these functions need hash.

"yes, we only care about uniqueness. We use this hash in civimail and in profile when generating urls"

I just want to be comprehensive and not regret leaving something out later on that comes back to bite me.

Ron  8)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Import of Excel CSV - Inclusion of HASH
November 17, 2011, 11:30:52 am
You mean using the contact checksum? Yeap, been using it.

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

rscott7706

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Import of Excel CSV - Inclusion of HASH
November 17, 2011, 11:55:58 am
xavier, I truly appreciate your assistance, but it seems as if we are not addressing my basic questions, I never stated anything about checksum, I don't even know what that is.  I am a newbie, and trying to make sure that if I import a CSV file, I am doing the right thing.

I have a two choices I can make:

1. I can populate the hash field in my CSV file, but want to be sure CIVICRM will handle it properly. 

2. Or, if CIVICRM will automatically populate the field on a CSV import, I don't have to worry about doing that in my CSV.

My question is, will CIVICRM automatically populate the hash filed, if not, will CIVICRM accept my hashed code, and not allow duplicates?

I hope this clarifies my confusion and you can help on this.

Ron  8)

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: Import of Excel CSV - Inclusion of HASH
November 17, 2011, 12:21:24 pm
i will await someone who can explain what the point of importing hash will have
but we have dozens of clients whom we have imported contact data for and have then used all functions available with civicrm and never had an issue - so either this is an important aspect i need to understand or it is unnecessary.
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: Import of Excel CSV - Inclusion of HASH
November 17, 2011, 01:11:44 pm

might be a lot easier and quicker to try and do a few small imports to anwer your question

I think civi will set the hash column if not set

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

rscott7706

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Import of Excel CSV - Inclusion of HASH
November 17, 2011, 02:57:01 pm
Thanks Lobo, was going to do just that, but got pulled away.

Will try it and post results.


Ron  8)

Generic

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 4
  • CiviCRM version: 4.2.*, 4.5.*
  • CMS version: Joomla 2.5.*
  • MySQL version: 5.1.*
  • PHP version: 5.3.*
Re: Import of Excel CSV - Inclusion of HASH
January 19, 2012, 03:07:46 am
Just wondering if there was any conclusion to this.

[CONCLUSION]

I have tested this and yes the hash will be generated
« Last Edit: January 19, 2012, 05:00:35 pm by Generic »
Document everything!
Zim-Wiki

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import of Excel CSV - Inclusion of HASH

This forum was archived on 2017-11-26.