My set up is similar to the setup in this question: How to integrate Field collection module in Views?
I have a content type with a field collection field (hereafter itineraries) that accepts unlimited entries. In the field collection is a (user) entity reference field (hereafter travelers) that accepts unlimited values. It also has another (user) entity reference field (hereafter approvers) separate from the field collection.
I've created a user view, with a contextual filter to select the current logged in user. This view has a relationship to bring in the nodes that reference the current user via the approvers field. I have another relationship pulling in the itineraries attached to the node.
What I would like to do is make a field in my view that has a comma separated list of travelers on the node. I can get the travelers from a single itinerary into a field, but nodes with multiple itineraries result in multiple rows.
I guess the solution must be to somehow embed a view to feed this view, but I'm not sure how to approach that, perhaps that would require an additional module?
Update: At @no-sssweat's recommendation I tried out the Views Field View module.
I tried a content view, passing the nid
and using a relationship to get the field collection items.
With that I was able to get something like this for a node with the two itineraries, the first with two travelers and the second with one:
Travelers:
Person One, Person Two
Person Three
I also tried a field collection item view, with the intention of passing in the field collection item ids as contextual filters. Testing this in the view itself, I got one traveler per row, but in practice I couldn't figure out a good way to pass id1,id2,id3 to the view. The view with ids input manually looks like this:
Travelers:
Person One
Person Two
Person Three
So in both cases I would get all the travelers listed in one field as the result of the embedded view, but they are listed each in their own divs within the field. I'm trying to figure out how I can get them listed as a comma separated list of values. I want to get to a field that looks like this:
Travelers:
Person One, Person Two, Person Three
Can you help me get over that last hump?