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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Creating and wrangling complex "paired" custom data
Pages: [1]

Author Topic: Creating and wrangling complex "paired" custom data  (Read 518 times)

mark_o

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 3.3.5 and 4.0
  • CMS version: Joomla 1.5 and 1.6
  • MySQL version: 5.0.91
  • PHP version: 5.2.17
Creating and wrangling complex "paired" custom data
April 21, 2011, 11:35:38 am
Hello. I have a quirky problem - was wondering if there was any hope for me. It requires a bit of an explanation, so please bear with me...

I was hoping to create a custom data set that would have a pull down menu of dance styles (ballet, tap, jazz, hip-hop, etc) and another pull down that would be related to the first that would contain various levels (novice, intermediate, professional, etc.). As well, there would be a related check box to indicate whether or not the dancer is certified through our program. The data would be collected in pairs (or triplets, rather) like so:


Option 1     Option 2       Certified
jazz         intermediate   checked
ballet       novice         unchecked
Irish step   advanced       checked


I attached a picture of how imagine the interface might look...
 
I have created a custom data set that has the options set up like I want. I have checked the "Does this Custom Field Set allow multiple records?" yes - and tried to choose the inline option. Evidently, however the multiple records choice limits me to only choosing the tab option.

I can live with that if that's the way things work, but when I try to create a CiviCRM profile for a member directory search, the custom data doesn't appear in any of the options (individual, contact, etc.). The idea of having these sets of data is to create a search function that would allow someone to search by picking from each column and searching for a match. Something like this:

SEARCH Option 1 [pulldown]     -     SEARCH Option 2 [pulldown]

...where I could choose "jazz" from the pulldown on the left and "advanced" from the pulldown on the right - and the search return would show me only those folks in the database who had jazz/advanced as a pair (and the search results would also show yes or no under a column labeled certified).

So.

In a nut shell:

1. Can I create "paired" data sets in the way I have described?
2. Can I get the interface to exist inline (even if it means having a predetermined number of sets - like the attached image shows)?
3. If not, how can I get the data stored in the "tabbed" area to show in a profile search?
3. Is it possible to have a complex search function like the one I described?

Your time is most appreciated - CiviCRM is such a wonderful tool for us!

Thank you in advance,
Mark

p.s. if the attached image doesn't show, I have posted it at hxxp://www.fineminddesign.com/civi_wish.png

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: Creating and wrangling complex "paired" custom data
April 21, 2011, 11:57:26 am
Quote from: mark_o on April 21, 2011, 11:35:38 am
1. Can I create "paired" data sets in the way I have described?

yes, you just did :) However note that option 1 and option 2 are not related in any manner

Quote from: mark_o on April 21, 2011, 11:35:38 am
2. Can I get the interface to exist inline (even if it means having a predetermined number of sets - like the attached image shows)?

In the current UI / codebase, no.

Quote from: mark_o on April 21, 2011, 11:35:38 am
3. If not, how can I get the data stored in the "tabbed" area to show in a profile search?

You will need to do this via custom coding and hooks. I've done this a fair bit for my school project, where most of the data is stored in multiple record custom groups

Quote from: mark_o on April 21, 2011, 11:35:38 am
4. Is it possible to have a complex search function like the one I described?

Again this will need to be custom coded. The current search (if fields are searchable will appear in advanced search) will give you results for all contacts

who have selected jazz

AND

who have selected advanced (not necessarily with jazz)

AND

who have checked the mark (not necessarily with the above two)

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

mark_o

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 3.3.5 and 4.0
  • CMS version: Joomla 1.5 and 1.6
  • MySQL version: 5.0.91
  • PHP version: 5.2.17
Re: Creating and wrangling complex "paired" custom data
April 21, 2011, 04:18:41 pm
Hi Donald,

Thank you for the response and clarification. If I manage to work out a solution, I will be sure to share it here. Thanks again for all the hard work it takes to keep CiviCRM so great!

Cheers,
Mark

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Creating and wrangling complex "paired" custom data

This forum was archived on 2017-11-26.