Numeric Totals In Explorer Template

Discuss using and your tips/tricks for BookCAT
Post Reply
iainct
Posts: 2
Joined: Wed Dec 14, 2016 8:05 pm

Numeric Totals In Explorer Template

Post by iainct » Wed Dec 14, 2016 8:11 pm

Is it possible to add the totals of other available numeric fields (eg Custom 10 or Custom 21) for display on the Explorer (home) template?

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Numeric Totals In Explorer Template

Post by LotsOCds » Thu Dec 15, 2016 1:08 pm

Yes. The code looks like

Code: Select all

##CMD:SUM:table,field,filter##
"table" is the BookCAT table where the field you want to sum is stored, "field" is the field you want to sum, and "filter" is an optional filter of the records to be summed.

The code to sum Custom10 for all records would be

Code: Select all

 ##CMD:SUM:book,custom10##
Note that the value returned by CMD:SUM can not be used in other operations in your template. That is because the CMD:SUM is performed after the template has been processed by the XSLT engine.
Cheers,
Dave

Post Reply