view with nested relationships I have 3 node types. A, B and C.

A has an entity reference to B. B has an entity reference to C.

A has a list field. One of the values is "4". I need to display all node of type C where the top parent of type A has the value 4 in this list field.

I created a 'relationship referencing entity:field_in_type_a_reference_to_type_b'. And I created a context filter 'provide default value:4' with the relationship.

This part works. Only nodes of type B with parent nodes with list value '4' are displayed.

But I need the filter for one reference level deeper, for nodes of type C. I created one more relationship referencing entity:field_in_type_b_reference_to_type_c with the relationship. I tried this relationship with and without the other relationship.

But with no success. Nodes of type C aren't displayed.

How can I get the relationship from C to A?
It sounds like you're starting with node type B, whereas you should be starting with node type C.


Create your view with appropriate filters so that you only see nodes of type C
Add a "Entity Reference: Referencing entity" (not "Referenced entity) relationship for the B->C entity reference field, give it an identifier of something like "Entity B", tick "Require this relationship
Add another "Entity Reference: Referencing entity" relationship for the A->B entity reference field, use relationship "Entity B", give it an identifier of "Entity A", tick "Require this relationship
Add a filter (a regular filter, not a contextual one) requiring that your field has a value of "4", use relationship "Entity A"