|Title|Table Summary markup
|Date|18-Jul-2006 16:49:11 EEST
|JSPWiki version|2.4.x and above
|Submitter|Nascif Abousalh-Neto
|[Idea Category]|MarkupIdea
|Reference| http://4umi.com/web/javascript/tablesum.htm
|[Idea Status]|NewIdea

This plugin would be similar to the functionality implemented by the [Spread Sheet Filter] but would be implemented in Javascript using extended markup, along the lines of [Filtered Tables|BrushedTemplateFilteredTables].

The same way that the filter-table markup introduces a row on the top of the table (below the headers) to present a drop-down with a list of values for filtering, the summary-table markup would introduce two rows in the bottom: one with drop-downs allowing the user to select an aggregation function (like SUM, MIN, MAX, AVERAGE, MEAN, COUNT, etc.) and another row with the actual data.

The advantage of using markup to implement this functionality is two-fold:
* The user can choose a different aggregation function without having to open the page in edit mode, making a change, and saving it again;
* The aggregation function can respond to local changes in the contents of the table. In particular, it could be made aware of the changes operated by the filter-table markup. 

__Example__: a user could start with a table showing all the development tasks in a given project, and the summary row would be used to show the total number of estimated hours. 

Then the user could use the filter-table to keep only the rows related to a particular designer. The summary-table would automatically be updated to display the total number of estimated hours for just those rows.