Greetings fellow Drupalers,

How can I use a node's fields to limit/filter the same node's node reference field?

For instance, how could one use a date field to filter the view feeding the node reference field options.

I reckon there's an option to pass some view arguments on the field settings. However, it seems to be static and doesn't accept any type of tokens.

Any input on this would be highly appreciated!

link|improve this question
It would be helpful if you could expand upon what you are trying to do with a specific example. The meaning of the second paragraph ("For instance...') is not clear. Also, you refer to arguments (D6) and contextual filters (D7) so what version of Drupal are you using? – Ashlar Feb 23 at 4:26
feedback

1 Answer

A node reference field holds the nid of a specific node assigned to the field. It is the identify of another node and is not dynamic and so cannot be used to further filter a view. You can filter the view using the filters in the first column of the view definition form. The range of filters available can be expanded by providing relationships (3rd column). You can also use information available from the contexts that exists at the time the view is called such as who the user is, taxonomy terms associated with the selected content, or information included in the URL using contextual filters (D7). Mastering views can be quite challenging and I recommend viewing 'Taming the Beast' from nodeone.se

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.