Configuring Siebel eBusiness Applications > Overview of Web Templates and Siebel Tags > About Siebel Templates >

Displaying Totals of List Column Values


This feature supports the following:

  • Simple summation of values in a list column
  • Totals based on expressions defined at the business component field level

For example, the Revenue business component has the fields Quantity, Price, and Calculated Revenue. The field Calculated Revenue has an expression defined in its Calculated Value attribute as [Quantity]*[Price]. In a list applet based on this business component, you can show the total quantity and the total revenue. The total value for quantity is the sum of all quantity field values. The total value for revenue is the product of the totals of the quantity and price columns.

To configure a list applet to display totals

  1. Set the Totals Displayed and Totals Required properties of the List object to TRUE.
  2. Set the Total Required property of the specific list columns that need to be totaled to TRUE.
  3. Set the Web Template used by the Base or Edit List applet Web template to Applet List Totals (Base/EditList).
  4. Use the value Total for the Property attribute of the <swe:control> tag in the template file:

    <swe:control id="XXX" property="Total"/>

    or

    <swe:control id="XXX">

    <swe:this property="Total"/>

    </swe:control>

    When the Property attribute is set to Total, either in the <swe:control> tag or the <swe:this> tag, the total for the list column values is rendered if the list column is enabled for totals. If the list column is not enabled for totals, no output is generated. This property is valid only when the <swe:control> tag is mapped to a list column.

To enable expression-based totals

  1. Check that the business component field to which the list column is mapped has an expression defined.
  2. Set the Total Required attribute.
  3. Add a user property named TotalAsExpr for the list column.

    NOTE:  Adding the user property is enough to evaluate the totals as an expression; the fields properties are ignored.

  4. Use the value Total for the Property attribute of the <swe:control> tag in the template file as described in Step 4 under To configure a list applet to display totals above.

You can also show totals in a separate applet. An example of showing the totals in a separate applet can be seen in the Quote Details View. A form applet appears below a list, which contains summations of columns within the list.

To show totals in a separate applet

  1. Create a form applet and place it below the list applet in the view.
  2. Create a field in the business component that sums a multivalued field using the calculated expression syntax Sum([Multi Value Field]).
  3. Create in the business component a Multi Value Link object and a Multi Value Field object based on the link.

    The Multi Value Link object references the business component that supports the list of values to be summed.

    CAUTION:  Never put a Sum([Multi Value Field]) expression in a list column. This requires that a separate query be executed for each record in the list, which is a significant performance issue.

Configuring Siebel eBusiness Applications