I've defined a field collection with fields containing multiple values.
I would like to export each of these fields in a column with comma separated values when there are multiple values.
For the moment, using the field collection relationship, it creates a new row for each value of my field collection.

For example, let's say I have a person with multiple addresses:

- name
- address (field collection - multiple values)
    - street
    - city

In my view I have:

name ; street ; city ;
John Smith ; street1 ; city1 ;
John Smith ; street2 ; city2 ;

And I would like to have:

name ; street ; city ;
John Smith ; street1, street2 ; city1, city2 ;

Any ideas ?

CommentFileSizeAuthor
#4 Screenshot_20200827_162548.png17.87 KBNWOM
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adam_b’s picture

I've got a related issue at #1446102: Exporting fields that already output valid xml encoded content, which I'm beginning to suspect might be a generic issue with exporting entities. Anybody know if there's a discussion about this going on somewhere?

jmuzz’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

It depends on the format chosen and the settings it has available. For example, if you install display suite you can create an unformatted list of 'display suite' items which include the option to group them by a particular field. Not sure if there is a CSV format with a similar grouping option yet but that's what it would take to get the result you want.

jmuzz’s picture

There is an option for this in the format: settings no matter which one you choose, it isn't actually necessary to use display suite or another module for the one in the show settings.

NWOM’s picture

Category: Support request » Feature request
Status: Closed (won't fix) » Active
FileSize
17.87 KB

This doesn't have to do with the formatter settings, so I believe this was closed unintentionally. This has to do with the how the views displays "All" deltas through the Field Collection item's views relationship to the Field Collection Item.

I have linked another issue with the same problem. I believe that this would be a feature request, since even in the relationship configuration dialog it says that it creates a row for each value. Please see attached screenshot.