4.7.1 beta was announced to appear during this week.
There haven't been any commits lately containing summing. Your best bet is asking @agrath if he can build it in. Not sure if it would be too difficult at the moment though.
@agrath has added the functionality to perform sum, avg, min and max today. It'll be available in 4.7.1 when it is released. You gotta love this community when posting on the forum has direct influence on the core!
Sum numeric property values in children
I would like to get the sum of 'votes' of in the children and can't quite figure it out.
Assuming that I have a property called 'votes' as a numeric protery of the child nodes, how do I do this?
Obviously its throwing an error that 'votes' is not defined. Can this be done? What's the syntax to identify the property in the Sum?
TIA
Not sure if summing has been implemented. For now you could obviously do:
Currently, you might need to do some type checking for node.votes as well, this should be a bit easier in 4.7.1.
Thanks cultiv Looping through the nodes is what I've done but thought there might have been a "Sum" avaliable to use.
4.7.1 must only be a week or two away so I keep an eye out for a sum in that release and update this post if it is there.
Cheers
4.7.1 beta was announced to appear during this week.
There haven't been any commits lately containing summing. Your best bet is asking @agrath if he can build it in. Not sure if it would be too difficult at the moment though.
@agrath has added the functionality to perform sum, avg, min and max today. It'll be available in 4.7.1 when it is released. You gotta love this community when posting on the forum has direct influence on the core!
That is ace!! So you're lucky 4.7.1 got delayed then. ;)
Hell yeah. Waiting to pull a nightly down tonight to have a play.
is working on a reply...