I have a content type with a multivalue entity reference field. In a view I show a list of nodes of this content type in a table. The column of the multivalue field (column C in the example) should show a comma seperated list of a field of the content type it references, these values are just single letters. In the view I enabled 'Display all values in the same row' for the multivalue field. Aggregation is on and the group column is set to Entity ID.
So for example, this should be the output of the view:
Column A Column B Column C
-------- -------- --------
value A1 value B1 X, Y, Z
value A2 value B2 Y, Z
When actually I get this:
Column A Column B Column C
-------- -------- --------
value A1 value B1 X, X, X
value A2 value B2 Y, Y
So what happens is, the first value in the list gets repeated as many times as the number of values.
I appreciate any help I can get!
This is the export of my view:
$view = new view();
$view->name = 'view_constitutionele_genetische_aandoeningen';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Constitutionele genetische aandoeningen';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Constitutionele genetische aandoeningen';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['group_by'] = TRUE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['distinct'] = TRUE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '50';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
'field_gentest_accreditatie' => 'field_gentest_accreditatie',
'title' => 'title',
'field_gentest_gen_locus_chromos' => 'field_gentest_gen_locus_chromos',
'field_mat_gentest_afkorting' => 'field_mat_gentest_afkorting',
'field_gentest_materiaal' => 'field_gentest_materiaal',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
'field_gentest_accreditatie' => array(
'sortable' => 0,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'title' => array(
'sortable' => 0,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'field_gentest_gen_locus_chromos' => array(
'sortable' => 0,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'field_mat_gentest_afkorting' => array(
'sortable' => 0,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'field_gentest_materiaal' => array(
'align' => '',
'separator' => '',
'empty_column' => 0,
),
);
/* Relationship: Entity Reference: Referenced Entity */
$handler->display->display_options['relationships']['field_gentest_materiaal_target_id']['id'] = 'field_gentest_materiaal_target_id';
$handler->display->display_options['relationships']['field_gentest_materiaal_target_id']['table'] = 'field_data_field_gentest_materiaal';
$handler->display->display_options['relationships']['field_gentest_materiaal_target_id']['field'] = 'field_gentest_materiaal_target_id';
/* Field: Content: Accreditatie */
$handler->display->display_options['fields']['field_gentest_accreditatie']['id'] = 'field_gentest_accreditatie';
$handler->display->display_options['fields']['field_gentest_accreditatie']['table'] = 'field_data_field_gentest_accreditatie';
$handler->display->display_options['fields']['field_gentest_accreditatie']['field'] = 'field_gentest_accreditatie';
$handler->display->display_options['fields']['field_gentest_accreditatie']['label'] = '';
$handler->display->display_options['fields']['field_gentest_accreditatie']['element_label_colon'] = FALSE;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = 'Aandoening';
$handler->display->display_options['fields']['title']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['title']['alter']['rel'] = 'width:600,height:400';
$handler->display->display_options['fields']['title']['alter']['link_class'] = 'mb';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
/* Field: Content: Gen / Locus / Chromosoom */
$handler->display->display_options['fields']['field_gentest_gen_locus_chromos']['id'] = 'field_gentest_gen_locus_chromos';
$handler->display->display_options['fields']['field_gentest_gen_locus_chromos']['table'] = 'field_data_field_gentest_gen_locus_chromos';
$handler->display->display_options['fields']['field_gentest_gen_locus_chromos']['field'] = 'field_gentest_gen_locus_chromos';
$handler->display->display_options['fields']['field_gentest_gen_locus_chromos']['element_label_colon'] = FALSE;
/* Field: Content: Afkorting */
$handler->display->display_options['fields']['field_mat_gentest_afkorting']['id'] = 'field_mat_gentest_afkorting';
$handler->display->display_options['fields']['field_mat_gentest_afkorting']['table'] = 'field_data_field_mat_gentest_afkorting';
$handler->display->display_options['fields']['field_mat_gentest_afkorting']['field'] = 'field_mat_gentest_afkorting';
$handler->display->display_options['fields']['field_mat_gentest_afkorting']['relationship'] = 'field_gentest_materiaal_target_id';
$handler->display->display_options['fields']['field_mat_gentest_afkorting']['label'] = '';
$handler->display->display_options['fields']['field_mat_gentest_afkorting']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_mat_gentest_afkorting']['element_label_colon'] = FALSE;
/* Field: Content: Materiaal */
$handler->display->display_options['fields']['field_gentest_materiaal']['id'] = 'field_gentest_materiaal';
$handler->display->display_options['fields']['field_gentest_materiaal']['table'] = 'field_data_field_gentest_materiaal';
$handler->display->display_options['fields']['field_gentest_materiaal']['field'] = 'field_gentest_materiaal';
$handler->display->display_options['fields']['field_gentest_materiaal']['alter']['alter_text'] = TRUE;
$handler->display->display_options['fields']['field_gentest_materiaal']['alter']['text'] = '[field_mat_gentest_afkorting]';
$handler->display->display_options['fields']['field_gentest_materiaal']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_gentest_materiaal']['settings'] = array(
'link' => 1,
);
$handler->display->display_options['fields']['field_gentest_materiaal']['group_column'] = 'entity_id';
$handler->display->display_options['fields']['field_gentest_materiaal']['delta_offset'] = '0';
/* Field: Content: Duur */
$handler->display->display_options['fields']['field_gentest_duur']['id'] = 'field_gentest_duur';
$handler->display->display_options['fields']['field_gentest_duur']['table'] = 'field_data_field_gentest_duur';
$handler->display->display_options['fields']['field_gentest_duur']['field'] = 'field_gentest_duur';
$handler->display->display_options['fields']['field_gentest_duur']['element_label_colon'] = FALSE;
/* Sort criterion: Content revision: Title */
$handler->display->display_options['sorts']['title']['id'] = 'title';
$handler->display->display_options['sorts']['title']['table'] = 'node_revision';
$handler->display->display_options['sorts']['title']['field'] = 'title';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'gentest' => 'gentest',
);
$handler->display->display_options['filters']['type']['group'] = 1;
/* Filter criterion: Content: Title */
$handler->display->display_options['filters']['title']['id'] = 'title';
$handler->display->display_options['filters']['title']['table'] = 'node';
$handler->display->display_options['filters']['title']['field'] = 'title';
$handler->display->display_options['filters']['title']['operator'] = 'contains';
$handler->display->display_options['filters']['title']['exposed'] = TRUE;
$handler->display->display_options['filters']['title']['expose']['operator_id'] = 'title_op';
$handler->display->display_options['filters']['title']['expose']['label'] = 'Zoeken';
$handler->display->display_options['filters']['title']['expose']['operator'] = 'title_op';
$handler->display->display_options['filters']['title']['expose']['identifier'] = 'title';
$handler->display->display_options['filters']['title']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
3 => 0,
);
/* Filter criterion: Content: Language */
$handler->display->display_options['filters']['language']['id'] = 'language';
$handler->display->display_options['filters']['language']['table'] = 'node';
$handler->display->display_options['filters']['language']['field'] = 'language';
$handler->display->display_options['filters']['language']['value'] = array(
'all' => 'all',
'***CURRENT_LANGUAGE***' => '***CURRENT_LANGUAGE***',
'***DEFAULT_LANGUAGE***' => '***DEFAULT_LANGUAGE***',
'und' => 'und',
'nl' => 'nl',
'en' => 'en',
'fr' => 'fr',
);
/* Filter criterion: Content: Type (field_gentest_type) */
$handler->display->display_options['filters']['field_gentest_type_tid']['id'] = 'field_gentest_type_tid';
$handler->display->display_options['filters']['field_gentest_type_tid']['table'] = 'field_data_field_gentest_type';
$handler->display->display_options['filters']['field_gentest_type_tid']['field'] = 'field_gentest_type_tid';
$handler->display->display_options['filters']['field_gentest_type_tid']['value'] = array(
0 => '389',
);
$handler->display->display_options['filters']['field_gentest_type_tid']['vocabulary'] = 'taxonomy_categorie_gentest';
/* Display: Block */
$handler = $view->new_display('block', 'Block', 'view_block_const_gen_aan');
$handler->display->display_options['block_description'] = 'View Bloc: Const gen aan';