Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
field system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2012 at 10:59 UTC
Updated:
29 Jul 2014 at 21:30 UTC
Hi to all,
I have content type with entity refernce filed ( one to many ) - multi value.
I added on views Relationships with this field.
Now I want to get one/some or all the fields that referenced to that filed.
As I mentioned, this field in one to many, so there are multi values.
How can I get the fields of specific node.
I cant declare to specific node...
p.s.
when I add this field I have multi value option that allow me to choose how many and how to order this field, bet not on the relation.
Thanks a lot.
Comments
Comment #1
ntigh52 commentedWhen I add a relation entity reference ( field_entityreferene) and I HAVE MULTI VALUES, I get lines per the number of the number of references I have.
But, What if I want to relate it just to the first one? / last one ?
I can't define it even I have a multi value entity reference field.
for example, if I add the entity refernce field to the fileds on views module I can define what is the specific vale that I want to show, ( first/last/ all / 3 etc...)
Hope I explain it right..
Thanks a lot.
Comment #2
ntigh52 commentedActually what I asked for is the option to create a single record relation on views. ( from all the vallues/ items )
Just like when you can define in the entity refernce field on view, ( all, 1/2/3 items / reverse... )
Meanwhile I solved it this way,
I created one more field, 1 item = entity reference.
I added hook_node_presave. -> new_single_field = the specific_field_from_the_multivalues_of_the_other_entity_referece_field
Thanks
Comment #3
michaelfillier commentedThis is a core issue, unrelated to entity reference. There are some patches available for D7. See #964288: Field output lacks 'first' and 'last' css classes for field-items