Configuring Siebel Business Applications > Configuring Applets > Configuring Applet Buttons, Controls, and List Columns >

Displaying Totals for a List Column in an Applet


This topic describes how to display totals of values that Siebel CRM displays in the list column of a list applet.

Displaying the Sum of Values That Siebel CRM Displays in a List Column

You can display the sum of values that Siebel CRM displays in a list column in a list applet.

To display the sum of values that Siebel CRM displays in a list column

  1. In Siebel Tools, in the Object Explorer, click Applet.
  2. In the Applets list, locate the applet you must modify.
  3. Expand the Applet tree, and then click List.
  4. In the Lists list, set the properties of the List object using information from the following table.
    Property
    Description

    Total Displayed

    Make sure the property contains a check mark.

    Total Required

    Make sure the property contains a check mark.

  5. In the Object Explorer, expand the List tree, and then click List Column.
  6. Make sure the Total Required property for each list column you must total contains a check mark.
  7. In the Object Explorer, in the Applet tree, click Applet Web Template.
  8. In the Applet Web Templates list, choose the Base or the Edit List web template.
  9. Set the properties of the applet web template using information from the following table.
    Property
    Description

    Web Template

    Applet List Totals (Base/EditList)

  10. In the list applet template file, set the property attribute of the swe:control tag to Total.

    For example, use one of the following code:

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

    or

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

    If the property attribute in the swe:control tag or in the swe:this tag is set to a value of total, and if the Total Required property for the list column contains a check mark, then Siebel CRM displays the total for the list column values. If the Total Required property does not contain a check mark, then Siebel CRM does not create an output. This property is valid only if Siebel CRM maps the swe:control tag to a list column. For more information, see About List Applet Templates.

  11. Compile and test your modifications.

    For more information, see Using Siebel Tools.

Displaying a Total That Siebel CRM Derives from an Expression in a Business Component Field

You can display a total that references an expression that is defined in a business component field. For example, the Revenue business component includes the following fields:

  • Quantity
  • Price
  • Calculated Revenue

The Calculated Value property of the Calculated Revenue contains the following expression:

[Quantity]*[Price]

You can display the following values in a list applet that references this business component:

  • Total quantity. The sum of all values in the quantity field.
  • Total revenue. The product of the totals of the quantity and price columns.

To display a total that Siebel CRM derives from an expression in a business component field

  1. In Siebel Tools, display the List Column User Prop child object type of the List object type.

    For more information, see Displaying Object Types You Use to Configure Siebel CRM.

  2. Make sure an expression is defined in the business component field that Siebel CRM maps to the list column.
  3. Make sure the Total Required property of the list column contains a check mark.
  4. In the Object Explorer, click Applet.
  5. In the Applets list, locate the applet you must modify.
  6. In the Object Explorer, expand the Applet tree, and then click List.
  7. In the Object Explorer, expand the List tree, and then click List Column.
  8. In the List Columns list, locate the column you must modify.
  9. In the Object Explorer, expand the List Column tree, and then click List Column User Prop.
  10. In the List Column User Props list, add a user property named TotalAsExpr.

    Adding this user property is sufficient to evaluate the totals as an expression. Siebel CRM ignores the properties of the field.

  11. Set the property attribute of the swe:control tag in the template file to Total.

    For more information, see Step 10.

  12. Compile and test your modifications.

    For more information, see Using Siebel Tools.

Displaying Totals in a Separate Applet

You can display totals in a separate applet. For example, Siebel CRM displays a form applet below a list in the Quote Details View. This form contains totals of columns that it displays in the list.

To display totals in a separate applet

  1. Create a form applet.
  2. Place the form applet below the list applet in the view.
  3. Create a field in the business component that the applet references.
  4. Add the following expression to the Calculated Value property of the business component field:

    Sum([multi-value field])

    CAUTION:  Never define a Sum([multi-value field]) expression in a list column. This expression requires a separate query run for each record in the list. It can cause significant performance problems.

  5. In the business component, create a multi-value link.
  6. In the same business component, create a multi-value field that references the multi-value link.

    The multi-value link references the business component that supports the list of values that Siebel CRM sums.

  7. Compile and test your modifications.

    For more information, see Using Siebel Tools.

Configuring Siebel Business Applications Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.