SUMFIELD

Used to calculate the sum of a numeric field across all the matches in a FormQueryPlugin query result.
Parameter Description
query Required, name of the query to sum over
field Required, name of the field to sum
For example, let's say we have a form type called "VitalStatistics" that has a field "Age" in it. We can sum all the ages in all occurences of the form using:
%FORMQUERY{name=vs search="form='VitalStatistics'"}%
Sum of ages = %SUMFIELD{query=vs field="Age"}%
The result is a single number representing the sum of all the fields.

Note that values embedded in tables can be summed using the shorthand described above.

See also: FormQueryPlugin, %SUMFIELD%, %FORMQUERY%, %QUERYTOCALC%, %TABLEFORMAT%, %SHOWCALC%, %MATCHCOUNT%, %SHOWQUERY%
Topic revision: r1 - 17 Nov 2009, CrawfordCurrie - This page was cached on 17 Jan 2018 - 12:08.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License