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) »
  • Required fields & importing
Pages: [1]

Author Topic: Required fields & importing  (Read 741 times)

lgel-sw

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Wordpress
  • MySQL version: unknown
  • PHP version: unknown
Required fields & importing
July 21, 2014, 05:41:49 am
I'm trying to import our previous database (exported to csv) to our shiny new CiviCRM install. Our company has been around for a while, and we have a mix of different contact data: physical addresses, email addresses and sometimes even multiple of both.

So far so good, CiviCRM seemed to support that. But when importing, I get the following message in my testing set: "Missing required fields: First Name OR Email Address". This is very well possible, because we have plenty of people in our dataset that we only have a physical address of and only know the last name (combined with academic prefix or gender that makes a proper address).

Ideally, I would like to 'unrequire' both the first name and the email address field.

A workaround was suggested on IRC: add a dummy email address and add the 'do not email' as 1. This is what I did for my test set (using test@test.com), and even multiple similar addresses. However, I still get the same error for the fields without a First Name. If I import them with a dummy First Name and try to remove them later again, that is also disallowed.

Is there a way to change which fields are required? Or alternatively, to work around this problem?

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Required fields & importing
July 22, 2014, 05:54:07 am
My understanding is that "First Name and Last Name OR an email" is our requirement.  I can see how Mr Smith is a valid amount of data for a contact record but I am not sure how you are going to get around that.

Quote
I still get the same error for the fields without a First Name

Can you be more specific on this? I would be suprised if you got an error importing Last name: Smith Email test@test.com. If you did, you should try and replicate on the demo, and if you can, please report a bug: http://book.civicrm.org/user/current/the-civicrm-community/bug-reporting/ https://civicrm.org/bug-reporting

Quote
Is there a way to change which fields are required?
Nope - it is hard coded as "First Name and Last Name OR an email"
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

lgel-sw

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Wordpress
  • MySQL version: unknown
  • PHP version: unknown
Re: Required fields & importing
July 22, 2014, 07:28:10 am
Thanks for your reply. I fiddled a bit more, and found out that part of the problem why the workaround didn't work, is that we have multiple columns of email addresses: Email (main), Email (Alternative), Email (assistent) etc. Obviously, most people only have Email (main). It seems that the import function considers the email to be missing if either of the 'email' fields are empty (if correct, you should be able to replicate). This seems like a bug? I would be happy to try and replicate on the demo - can you link it to be sure I have the right one?

Too bad by the way that this is hardcoded... I hope that will be changed. Especially in the future more and more people will be with unknown email address, but only with messenger handles, account names on social media etc. It would be great if every civicrm owner could eventually set their own 'required fields'.

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: Required fields & importing
July 22, 2014, 08:23:15 am

yes. moving away from required fields would be a great enhancement and improvement. Any chance you can spearhead the work with regard to this?

thanx

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Required fields & importing

This forum was archived on 2017-11-26.