Hi all,

I have a few nodes with an cck field using integers. Say a node with integer 2 and a node with integer 3.

These nodes have various node references and I would like to filter all nodes referenced by the node with the largest integer.

In the previous example this would be the node 3 (with integer 3). But when creating a node with integer 4, I would like to filter for node 4.

I can't use any other value than the integer (so creation date is not an option). But the operators does not seem to be handling anything alike.

So, is this possible or not? And any hint on howto?

Comments

dawehner’s picture

Sort by the integer descending and limit the result to 1.

Then you will get only the item with the highest number

dakke’s picture

I probably did not explain myself the way I wanted.

An example:
Node 1:
--CCK field integer: 1
--node ref 1
--node ref 2
--node ref 3
Node 2:
--CCK field integer: 2
--node ref 1
--node ref 2
Node 3:
--CCK field integer: 3
--node ref 1
--node ref 2
--node ref 3
--node ref 4
--node ref 5
--node ref 6

I want all node references to show up of node 3 (for it has the largest integer). This would be a total of 6 referenced nodes. I have thus to limit the shown nodes to 6 (for it will show 6 referenced nodes)

Now say that I create a new node 4:
Node 4:
--CCK field integer: 4
--node ref 1
--node ref 2

Node 4 has only 2 references to other nodes. Hence I only need those two and not six (as with previous case). Hence I have to limit it to 2.

So the node with references I can sort as you said, but it does not allow me (I think) to get all the referenced nodes of node 3 or node 4.

In other words: I need to filter/sort the node with the largest integer AND then show all referenced nodes of this node.

Or am I missing something?

R.Hendel’s picture

Status: Active » Fixed
Issue tags: +dvcs11

Hallo,
is your request still open?

It is for quite a long time undiscussed. So I will set it on fixed to clean the queue.
Please feel free to reopen it, if you have any further questions. Otherwise it would be closed automatically after two weeks.

Automatically closed -- issue fixed for 2 weeks with no activity.