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 Profiles (Moderator: Dave Greenberg) »
  • Custom Multiple Value fields in profiles - sort of working?
Pages: [1]

Author Topic: Custom Multiple Value fields in profiles - sort of working?  (Read 709 times)

petherfile

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Joomla! 3.2.2
  • MySQL version: 5.5.35-0
  • PHP version: 5.4.4-14
Custom Multiple Value fields in profiles - sort of working?
March 19, 2014, 06:07:53 pm
Hi,

 I'm just starting with CiviCRM and am setting it up for a community music organisation. It is mostly going quite well, except for trying to use custom multiple value fields in a profile - I know this never worked in previous versions but I'm fairly sure is supposed to work in newer versions, I have 4.4.3 running right now.

 It kind of works... I do get the first of the multiple values in the profile, but you can only enter one value, there is no option to add additional values to the multi value feild nor do multiple entries display when they already exist. I have ticked the "Include in multi-record listing?" checkbox (and tried without the checkbox, no change in behaviour.)

 I feel like there must be something I'm missing to make these multi values work, but I can't find what. I have not been able to find a good doco about using multi values on profiles, just some refernces that they do now work.

Thank you for any help.

Jeremy Proffitt

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
    • Mobius New Media
  • CiviCRM version: 4.4.x
  • CMS version: Joomla 2.5.x/3.x / D7
  • MySQL version: 5.1.x
  • PHP version: 5.3.10+, 5.4.x
Re: Custom Multiple Value fields in profiles - sort of working?
March 19, 2014, 07:19:43 pm
The profile is only intended to be able to enter one record at a time, and you are only allowed to have one multi-record field per profile. The idea is that you need an individual profile who's job it is to add things to a multi-record profile, and you're not trying to mix other data in at the same time.

The display part of the field shows the multi-record summary. I believe this is usually the last entry entered. In order to use a profile to display multi-record fields the way you're trying to, you'd have to create a template override, and use the CustomValue API to get the data and display it in place of the usual data.

There are several steps in that process, but I'd be happy to share the code with you to do it if you're interested.
Jeremy Proffitt
Mobius New Media
IRC: JP_EzoD

petherfile

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Joomla! 3.2.2
  • MySQL version: 5.5.35-0
  • PHP version: 5.4.4-14
Re: Custom Multiple Value fields in profiles - sort of working?
March 19, 2014, 08:10:13 pm
Ahh... that puts a bit of a pickle in my ointment then, unless you mean one custom data set per profile rather than one field?
 I have two manditory multi value fields as part of one custom data set (instrament and ability level for that instrament.) As far as enforcing good data in the database this method really does work the best for what I'm doing. Seems to cause some problems in display and data entry though.
 I'll have a play around and see if I can get a workable solution without resorting to the template overide you mention... Though I am interested to know more about it, more from a "is this a realistic amount of work" perspective at the moment.

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Custom Multiple Value fields in profiles - sort of working?
March 19, 2014, 08:21:16 pm
I don't know much about multi-value fields, so you don't need to answer if this is a really stupid question.

 If you have two multi-value fields and someone is grade 3 in the cello and grade 6 in the flute how are you going to be able to extract that data successfully and not end up thinking it is grade 6 for cello and grade 3 for flute?

Also, let's say it is done on order of data entered and they put in cello and grade 3 first then flute and grade 6 - what happens when they pass another cello exam and need to change the grade 3 to grade 4?

petherfile

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Joomla! 3.2.2
  • MySQL version: 5.5.35-0
  • PHP version: 5.4.4-14
Re: Custom Multiple Value fields in profiles - sort of working?
March 19, 2014, 08:36:12 pm
Think of it like sets of multiple values maybe, each set has any number of rows with a set number of columns. Each instrament record in this set is in one column each ability leven in another. So in this way each instrament entry in a set is associated with it's own ability level. Each of these sets of values is associated with one contact.
 It works really nicely in the administrator interface, hard to make it nice elsewhere I am discovering though.

Jeremy Proffitt

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
    • Mobius New Media
  • CiviCRM version: 4.4.x
  • CMS version: Joomla 2.5.x/3.x / D7
  • MySQL version: 5.1.x
  • PHP version: 5.3.10+, 5.4.x
Re: Custom Multiple Value fields in profiles - sort of working?
March 19, 2014, 08:38:06 pm
You actually can't ever submit to a multi-value custom field set in the same way that the administrator does via the profile. The profile can only write one record to that field set at a time.
Jeremy Proffitt
Mobius New Media
IRC: JP_EzoD

petherfile

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Joomla! 3.2.2
  • MySQL version: 5.5.35-0
  • PHP version: 5.4.4-14
Re: Custom Multiple Value fields in profiles - sort of working?
March 19, 2014, 09:00:50 pm
I think I can deal with that as long as I can display them all at once. Displaying them all at once imediatly before they enter one new instrament would be required.

 Editing a selected multi value seems to be problematic too - a profile seems to always add a new value to a multi value record rather than changing an existing one.
« Last Edit: March 19, 2014, 09:10:04 pm by petherfile »

Jeremy Proffitt

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
    • Mobius New Media
  • CiviCRM version: 4.4.x
  • CMS version: Joomla 2.5.x/3.x / D7
  • MySQL version: 5.1.x
  • PHP version: 5.3.10+, 5.4.x
Re: Custom Multiple Value fields in profiles - sort of working?
March 19, 2014, 09:22:21 pm
Your observation is correct. The multi-record system is supposed to be one way. It's not meant for a profile to be able to go in and edit it in that way. All of that could be done via the API.

As for the display, I think given the way you're wanting to display it, you would need to use the API in the way I was mentioning earlier. Editing would require at least writing a Joomla module, but it could be done as well.
Jeremy Proffitt
Mobius New Media
IRC: JP_EzoD

petherfile

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Joomla! 3.2.2
  • MySQL version: 5.5.35-0
  • PHP version: 5.4.4-14
Re: Custom Multiple Value fields in profiles - sort of working?
March 19, 2014, 09:53:37 pm
Hmm, I'm seeing the option of having a set number of single value instrament fields clunky in other ways: esp. searching. I think I need to investigate using the API.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Custom Multiple Value fields in profiles - sort of working?

This forum was archived on 2017-11-26.