By aquila on
I would like to get a distinct field in a view. Currently, views seems to support only distinct nodes: the SQL query will add distinct(nid) when using distinct in views. How can I get distinct fields?
This looks so easy, yet it is not possible. Custom queries would make things possible, but that is not supported by views. The fact that the views 2 UI mentions that distinct does not always work is alarming...
(Example: say I have a content type item with a color field. I am now looking for how to generate a view of all used colors.)
Comments
Color field as Taxonomy
Hi,
Maybe what you could do is to make use of Taxonomy and turn color into a Vocabulary and turn on the free tagging option. So everytime your users add a color, its added to Vocabulary as a term. Then all you need to do is display all the terms in that vocabulary.
Hope this helps.
---
www.drupaldiy.com
I was thinking about exactly
I was thinking about exactly the same solution just this afternoon, so I'm going to give it a try. Thanks for your advice!
I did it like this
http://echodittolabs.org/blog/2010/06/group-views
It worked for me!
Worked perfectly here to :-D
Worked perfectly here to :-D