[Zope] Accumulate vars with <dtml-var expr="...">
Jesper Steen Steffensen
jsteffensen at gmail.com
Tue Jul 25 18:38:07 EDT 2006
Hi all.
I have a table with a list of values. To list my values in a dtml method i
write <dtml-var value> inside the appropriate dtml-in tag. In the next
column I have the <dtml-var sequence-number>
This gives me something like:
VALUE SEQNUMBER
13 1
10 2
11 3
10 4
12 5
...
I want to accumulate my values so the result will be:
VALUE SEQNUMBER ACCU
13 1 56
10 2 43
11 3 33
10 4 22
12 5 12
...
Is it possible to make this accumulated value as a
<dtml-var expr="[something like sum of values where seq-num <=seq-num]">
I can't do it in the ZSQL that gets the values, as the value field itself is
a calculated value (can only do it on non-calc'd data).
Any other non-SQL suggestions as to how this is achieved is highly
appreciated!
Thanks from Denmark
Steff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060726/4e612a99/attachment.htm
More information about the Zope
mailing list