0

My content type has two fields: field_title and field_related. The field_related is of type Entity Reference and its cardinality is set to unlimited.

The view should display the title, updated date and all related titles, in tabular form, like this:

Title          Updated      Related
=====================================
Chapter 1      2014-01-01   Note A
                            Note B
                            Note C
Chapter 2      2014-02-02   Note A
                            Note B

Currently, it is displaying this:

Title          Updated      Related
=====================================
Chapter 1      2014-01-01   Note A
Chapter 1      2014-01-01   Note B
Chapter 1      2014-01-01   Note C
Chapter 2      2014-02-02   Note A
Chapter 2      2014-01-01   Note B

I tried grouping, but it divided the whole table into separate tables.

I see no point here in using aggregation here (maybe I am wrong..)

What is the solution to this?

0

The answer was obvious. For the Entity Reference type of field, don't use fields from the referenced entity (like e.g. "Title") from a relationship. Instead, use the field from the main entity (without relationship). As a result, it displays a title of the referenced entity anyway and not an ID or something.

But in this case, the field gets "Multiple Field Settings" config group, which should be set to "Display all values in the same row". I saw that solution before, but in my view there wasn't this config group at all. That's because I used a field from relationship, which apparently doesn't have a setting for multiple value, because in that entity it's single value, it's a title.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.