Hi everybody,
I created a form class and put it in different pages. One of the object of
the class is a number (integer).
I made a live table that collects the data from the different pages and it
works.
I made also a little script that searches the objects of that class in the
documents of a certain space and displays the value in a standard table.

#set($listone = $xwiki.searchDocuments(", BaseObject as obj, StringProperty
as prop where doc.fullName=obj.name and obj.className='classname' and
doc.space='spacename'"))
#foreach($ww in $listone)
#set($documentObject = $xwiki.getDocument($ww))
  #foreach($object in $documentObject.getObjects('classname')) 
  |[[$ww]]|$object.field1|$object.field2|$object.field3
  #end
#end

The fisrst column contains a link to the page and the other columns the
value of the objects.

Now if field3 is the number, is there a way to calculate the total sum of
column 4 and store it in a variable that can be used later in the velocity
macro? Or also have the totals after a live table?

Second question, is it possible to create an array or variable that contains
the values of a single column, that is of a single object of the same class
in the different pages, to be used for further manipulations? 

-- 
View this message in context: 
http://xwiki.475771.n2.nabble.com/Sum-total-in-a-dynamic-table-tp5221885p5221885.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to