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) »
  • How to use grouping and filtering of option values?
Pages: [1]

Author Topic: How to use grouping and filtering of option values?  (Read 514 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
How to use grouping and filtering of option values?
October 05, 2013, 11:30:15 am
In the civicrm_option_value table, there are a few tantalizing fields I've never known how to use:

  `grouping` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Use to sort and/or set display properties for sub-set(s) of options within an option group. EXAMPLE: Use for college_interest field, to differentiate partners from non-partners.',
  `filter` int(10) unsigned DEFAULT NULL COMMENT 'Bitwise logic can be used to create subsets of options within an option_group for different uses.',

  `is_optgroup` tinyint(4) DEFAULT '0' COMMENT 'Is this row simply a display header? Expected usage is to render these as OPTGROUP tags within a SELECT field list of options?',

I have a case now where I would like to filter the option values for electoral constituencies (we call them ridings, US calls them districts) based on the province. Is there documentation on this somewhere? There are no default entries in the option_value table with is_optgroup set, though the grouping is used for case_status and label_form (avery labels). filter<>0 (ie, 1, occasionally 2 or 3) for options in activity_type, participant_role, contact_edit_options, redaction_rule, email_greeting, postal_greeting and addressee option groups.

If someone could explain how these fields are / could be used I would document in wiki.

Thanks.
« Last Edit: October 05, 2013, 11:44:28 am by JoeMurray »
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

jamien-www.compucorp.co.uk

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 3.4 / 4.0
  • CMS version: Drupal 7.0
  • MySQL version: 5.5
  • PHP version: 5.3.7
Re: How to use grouping and filtering of option values?
October 29, 2013, 09:39:46 am
Something I have also wondered about... watch.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • How to use grouping and filtering of option values?

This forum was archived on 2017-11-26.