开发者

Filtering unique cck fields in views?

I'm trying to achieve a sort of special sorting in Drupal. Let's say we've got a table of data such as this:

Name Age Sex
John 19  Male
Mia  20  Female
Mia  21  Female

Here's what i want to acheive. I want to be able to remove one of the Mia's by filtering. The thing here is that the name field is not开发者_运维问答 the node title - but a node reference. How can i select those nodereferences distinct?

Cheers!


This is possible, I think.

First install Views version 3.0-alpha2 (or later). Views 2.x will not work.

Make a view, in "advanced settings" set grouping to "yes".

Your objective will be to group by the Name of the individual. Also you can add a function like MIN or MAX to select the person with the Maximum or Minimum age. So according to example above, Mia 20 will be eliminated if we take the function to be MAX.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜