I have a content type called part with a multivalue reference field to a custom entity called fitment.

on the part there is a field called SKU and on the custom entity type fitment there is a field called fitment ID

I want to create a table that shows the SKU for the part and then a list of fitment id's separated by pipe. This will then be used in data export.

SKU | Fitment ID

0001 |123123|12312|12321

I have tried using rendered entity to display the fitment reference field with a view mode that only shows fitment id but it leaves lots of white space around the fitment id because I have to strip html and whitespace using the views processor.

enter image description here

I'm sure I should be able to do this by adding a relationship in views and then using aggregation but I can't get the fitment id's to group on to the same row. I just get the following.

SKU | Fitment ID

0001 | 123123

0001 | 12312

0001 | 12321

enter image description here

  • Could you please include a screenshot of your current view, so that we can see how you are doing it now? Aug 3 '20 at 16:16
  • Does the Fitment ID field come with Multivalue settings?
    – prkos
    Aug 3 '20 at 16:57
  • @prkos the fitment ID is singular. Aug 3 '20 at 18:41
  • @Neograph734 I can't show the view exactly, I had to change some of the terminology because I'm not allowed to share the data structures as the actual data is licensed Aug 3 '20 at 18:46

I think you might want to look into Views Aggregator Plus. Views' default aggregation system uses 'group' for every field (you need to change at least one field into count, sum, etc to see effect), but that will not be the effect you are looking for.

Views aggregator plus will be able to also combine field values when grouping on another field.

Example from the project page with multiple companies in one industry:

Aggregated companies list

  • I tried that module but wasn't sure how to make it work, I'll try again by adding more fields than I need and adding one as a count. I think there may be a core issue with aggregation and custom entity types. Aug 3 '20 at 21:04

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.