Posted by Rosencruez on May 29, 2012 at 1:25am
I was wondering if anyone else ran into this problem. I have a view set up and one of the fields is a list of names (and the field type is an entity reference). When I try to sort it, I notice that it's not in alphabetical order like I expected, but actually in node ID. Is there a way to fix this?
Comments
Relationship on reference field
Instead of showing and sorting on reference field, create a Relationship in Views (under Advanced) on the reference field. Then you can add the Content: Title (make sure to use the relationship). Then sort on the same field.
More Clarification
In this view, I have 2 fields being displayed: the title, and the entity reference field in question. When I sort by title, it works fine and sorts alphabetically (Homer, Max, Stan). When I try to sort the entity reference, it does not sort alphabetically, but instead by node ID (Clifford, Jake, Betty).
Going with spovlot's suggestion, I tried creating relationships concerning the entity reference. I found 2 entries that looked like they would be useful: (Entity Reference: Referenced Entity) and (Entity Reference: Referencing Entity). I tried creating those relationships and applying it to the current fields I have, but that only makes those fields disappear. I'm not sure what I'm doing wrong...
EDIT: I figured it out, spovlot was right the whole time.
Glad you got it
Glad you got it working.
Scott