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 (Moderator: Dave Greenberg) »
  • Custom fields same name in two data sets
Pages: [1]

Author Topic: Custom fields same name in two data sets  (Read 494 times)

questions

  • I post occasionally
  • **
  • Posts: 79
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Durpal, 7
  • MySQL version: 5.1
  • PHP version: 5.3
Custom fields same name in two data sets
September 28, 2012, 06:33:08 pm
I have two different data sets used for different things.  I'd like to have the field name in both of them.  It is not allowed.  I understand not having the same name in the same data set.  I don't understand it in different ones.  In the database you end up with different tables for each data set so there isn't a problem here, beside for some arcane reason all the fields get a number appended to them (makes writing sql queries against the raw data fun) so they would have unique columns anyway.

Am I missing something?

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: Custom fields same name in two data sets
September 29, 2012, 07:23:48 am

I think this was done for some forgotten historic reason and is no longer relevant today. Can you take a look at the code and submit a patch to ensure that this check happens only for fields in the same table and not across all tables

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

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: Custom fields same name in two data sets
September 29, 2012, 10:53:09 am
indeed this comes up a fair amount - e.g http://forum.civicrm.org/index.php/topic,18674.msg109285.html#msg109285 - would be nice to fix it.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Custom fields same name in two data sets

This forum was archived on 2017-11-26.