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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • What's the logic of the custom_xx_yy param (on 3.3) ?
Pages: [1]

Author Topic: What's the logic of the custom_xx_yy param (on 3.3) ?  (Read 13335 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
What's the logic of the custom_xx_yy param (on 3.3) ?
January 30, 2011, 12:45:48 pm
Hi,

The api compatibility has been broken. What's the benefit of the new _yy (and what does it represent?).

How complicated whould it be to be able to set an "API friendly" name ? ie. having custom_special is nicer to work with than custom_34_238

Any suggestion to make it easier to find the mystery numbers more than welcome...

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

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: What's the logic of the custom_xx_yy param (on 3.3) ?
January 30, 2011, 05:36:30 pm

i think we introduced this protocol since we introduced multiple custom values, which was in 2.x or so

the number are the ids in the custom field table and the table that stores the values

you can potentially change the name to

group_name:field_name , but will then need to return the value table id in an array

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

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: What's the logic of the custom_xx_yy param (on 3.3) ?
January 31, 2011, 01:52:17 am
Hi,

At least seen from the API, this change was more recent (after 3.0).

What I'm worried about (beside readability of the code) is that the second number is going to vary from record to record (as it does/did do for the field id on the html forms). 

Is this the case or is custom_xx_yy (as seen on the html form id) always going to be the same two numbers on the API and I can use them as return on the contact_get api or as param on the contact_add and contact_create ?

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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • What's the logic of the custom_xx_yy param (on 3.3) ?

This forum was archived on 2017-11-26.