[Zope-CMF] Help with lists.....
Dieter Maurer
dieter@handshake.de
Fri, 24 Aug 2001 23:44:58 +0200 (CEST)
Ian Ford writes:
> What I am trying to do is get a list of users that have timecards
> created and then get the values from the timecards and output the
> information to a csv file.
> If I grab all the timecards from the portalcatalogs I get one entry in
> the csv file for every timecard. But what I really would like to do is
> get every timecard from each user and total all the values.
If you use a two level nested loop
(outer loop over "Creators", inner loop timecards for specific
creator), you could use "dtml-in" statistics variables.
If you want a single loop, you must compute the totals yourself.
The "dtml-in" attributes "first-XXX" and "last-XXX" will
help you to initialize and complete your accumulators.
More info: the "in" subsection in the "DTML" section of
URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html
Dieter