[Zope] The right way to sum fields

icottee@bluefountain.com icottee@bluefountain.com
Thu, 15 Jun 2000 01:08:31 +0100


I have a folder with a set of timesheets in it. If I create a method to sum a
field called I_TimeTaken is this the correct syntax?

---
<dtml-in "PARENTS[0].objectValues(['TimeSheet'])" size=1>

   <dtml-var total-I_TimeTaken>

</dtml-in>
---

To explain, this works but I'm interested to know if this is the right way.
Specifically because I am now trying to write another routine which totals not
just the current folder but the contents of any sub folders below and am running
into problems (i.e. I can't do it). If the basic step is wrong I'd like to know
before I use it in other places. Haven't managed to find anything in the
archives but I think I may be suffering from docs overload.

Many thanks for any help

Ian Cottee
(knee deep in Zope and way out of time)