I have three content types, A, B and C.
There's an unique field in each content type used for identification, A-ID, B-ID, and C-ID.
There's also an entity reference field for content type A and B, which would be A-Ref, B-Ref.
A-Ref can only reference nodes of content type B, while B-Ref can only reference nodes of content type C.
I created a view (path: list/%/%), and I would like to find the very only node of content type A with A-ID field set to the first parameter (let's call it node ABC), then looks through all nodes referenced through A-Ref in node ABC, and pick the one whose B-ID is set to the second parameter (let's call it node DEF).
Last, show a list of nodes of content type C referenced through B-ID in node DEF.
Spent hours trying to get the view to work but it doesn't. Any idea?

Comments

tjferre’s picture

Issue summary: View changes

Did you find a solution?

Hars Saraf’s picture

I had a similar problem. You can find my solution here :https://www.drupal.org/node/2657524#comment-10906366

renatog’s picture

Status: Active » Reviewed & tested by the community

Hi guys.

I check the solution in #4 of #2657524: Using a chain of entity reference fields to populate a list

Solution cited:

I broke the problem into 2 views and used "view field view" module to connect the 2 views.

In the first view; i used a relationship(entity referencing) and contextual filter(Content:nid) to reach the nid of the outline from the chapter nid.

In the second view; i used a relationship(entity referenced) and contextual filter(Content:nid) to reach the nid of the notes from the outline nid.

Using the Global: view field (from view field view) module I substituted the Outline nid for the contextual filter (Content:nid) in the second view.

Really makes sense.

renatog’s picture

Status: Reviewed & tested by the community » Fixed

Thanks Hars Saraf

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.