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 Drupal Modules (Moderator: Donald Lobo) »
  • support for inline fields in veiws (grouping multiple values in one field)
Pages: [1]

Author Topic: support for inline fields in veiws (grouping multiple values in one field)  (Read 577 times)

andersiversen

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
support for inline fields in veiws (grouping multiple values in one field)
March 06, 2014, 02:57:03 am
Hi

I have a view with fields showing display names and group id for contacts. If John Doe is a member of group with ID 1, 2 and 3 it lists John Doe three times - one for each group he is a member of. In the settings for fields in the view I can choose wich fields I want to display inline, and for example tick the checkbox for displaying group ID's inline and choose a seperator, but this is ignored. In a view for normal drupal content having a field for tags, I can chose what to do in case of multiple values for that particular field (basically the same as above, but the settings is in the dialog for the tags field itself).

Is it possible to do this with civicrm-fields like the group ID?

[edit: attached two screenshots form views showing an example of the dialogs I'm reffering to]
« Last Edit: March 06, 2014, 03:10:08 am by andersiversen »

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: support for inline fields in veiws (grouping multiple values in one field)
August 05, 2014, 09:15:24 am
Hi
I'm seeing the same issue (and noted it in this thread - http://forum.civicrm.org/index.php/topic,8803.0.html). Wonderingif you found a solution on this?
Graham Mitchell
http://mc3.coop

andersiversen

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: support for inline fields in veiws (grouping multiple values in one field)
August 27, 2014, 02:26:35 am
Hi

I didn't find a proper solution for this, but I found a work around:
I use the Drupal module views field view, that allows you to embed a view as a field in another (parent) view. In the field at the parent view, you can send the contact id as an argument to the embedded view. This is an ugly work around, because it's kind of heavy in the sense it does more database calls than necessary, but it does allow me to display anything I want from civicrm in one field for the one contact. If you strip all default wrappers in the embedded view you are still left with a views-field that looks something like this:

Code: [Select]
<div class="view view-civcrm-embeddedview view-id-embeddedview view-display-id-block view-dom-id-fa80e1a7f5736fd8ee8e1c8f8e212362">
      <div class="view-content">
        <div>
         <span>group 1</span>
       </div>
       <div>
         <span>group 2</span>
       </div>
    </div>
</div>

Which is not as nice as a comma-seperated list, but with some css or javascript, you can clean it up.

Upperholme

  • Administrator
  • Ask me questions
  • *****
  • Posts: 568
  • Karma: 8
    • MC3
  • CiviCRM version: 4.x
  • CMS version: Drupal 6.x/7.x, Wordpress, Joomla
Re: support for inline fields in veiws (grouping multiple values in one field)
August 27, 2014, 02:55:49 am
Hi Anders
I think we came to the same conclusion.
Graham Mitchell
http://mc3.coop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • support for inline fields in veiws (grouping multiple values in one field)

This forum was archived on 2017-11-26.