Seems like this might have worked at some point in the past, but not at present.

Comments

wylbur’s picture

Version: 5.x-1.5 » 5.x-1.6-1
Category: task » feature

Yeah, I could really use this right now. I created a wonderful Node type, and then made a node reference, all to see that I can't sort or group my views by this content.

Anonymous’s picture

Same problem, please add.

lucidus_neil’s picture

Ditto for me. I REALLY like the node reference capability but it loses some luster because we can't sort on it.

xxvelcrar’s picture

Status: Active » Closed (duplicate)

This appears to be the same issue as http://drupal.org/node/70380

knieveltech’s picture

It isn't pretty but there's a workaround:

- create an additional calculated field
- in the Computed Code field, assign the "value" (nid) of the offending node reference field as so:
$node_field[0]['value'] = $node->field_name[0]['nid'];

You can now sort by the value contained in your calculated field.

rukaya’s picture

I still can't sort by node reference field in Drupal 6 with views 2. I have no idea why, does anybody else?

darrellduane’s picture

See http://drupal.org/node/274909 for a solution using Relationships.