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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • CiviEvent Suggestions (Moderator: Michał Mach) »
  • Make price fields searchable.
Pages: [1]

Author Topic: Make price fields searchable.  (Read 1189 times)

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Make price fields searchable.
December 13, 2010, 11:46:07 pm
I am new to CiviCRM, (hopefully going live with event registration this week)  so if this is something that can be done already, please accept my apologies and it would be great if someone can tell me how.

I would like to be able to search using price fields in the same way that you can search using custom fields.  At the moment it seems that all the data from a price set is contained in the one field, separated by commas, so if I want to find, say everyone who has chosen to add the $15 Lunch to their seminar registration, it becomes a tedious business - particularly if you have several different price fields and several price options within each field.   

The only way I seem to be able to deal with this is to work out all the different total event fees there could be if lunch has been chosen, create a smart group based on fee amount for each total and combine all the smart groups into a parent smart group called "requires lunch".  Not very efficient and it won't work at all if you can get the same event total using 2 (or more) combinations of price options. (I've had to introduce a "$1 administration discount" for one item to get over this - unfortunately the event brochures were printed before we had access to civiCRM so we didn't forsee this problem)

I'm not quite sure about the structure of the database ( how can I find this out?), but it seems likely to me that each custom data set is a table with each custom data field being a column in that table.  It would be good to do the same for price sets (table) and price fields(column).  I suppose at the moment that each price set is a column within, perhaps, the events table.

JoAnne

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: Make price fields searchable.
December 14, 2010, 06:16:10 am

1. Check the table: civicrm_line_item

easier to parse and search in that table :)

2. Also check the priceset search

http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=9&reset=1

3. The CiviCRM ERD is  a useful thing

http://wiki.civicrm.org/confluence/display/CRMDOC33/CiviCRM+ERD+3.1

(though its not complete :(

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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • CiviEvent Suggestions (Moderator: Michał Mach) »
  • Make price fields searchable.

This forum was archived on 2017-11-26.