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
- In Siebel Tools, in the Object Explorer, click Applet.
- In the Applets list, locate the applet you must modify.
- Expand the Applet tree, and then click List.
- In the Lists list, set the properties of the List object using information from the following table.
|
|
Total Displayed |
Make sure the property contains a check mark. |
Total Required |
Make sure the property contains a check mark. |
- In the Object Explorer, expand the List tree, and then click List Column.
- Make sure the Total Required property for each list column you must total contains a check mark.
- In the Object Explorer, in the Applet tree, click Applet Web Template.
- In the Applet Web Templates list, choose the Base or the Edit List web template.
- Set the properties of the applet web template using information from the following table.
|
|
Web Template |
Applet List Totals (Base/EditList) |
- 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.
- 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
- 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.
- Make sure an expression is defined in the business component field that Siebel CRM maps to the list column.
- Make sure the Total Required property of the list column contains a check mark.
- In the Object Explorer, click Applet.
- In the Applets list, locate the applet you must modify.
- In the Object Explorer, expand the Applet tree, and then click List.
- In the Object Explorer, expand the List tree, and then click List Column.
- In the List Columns list, locate the column you must modify.
- In the Object Explorer, expand the List Column tree, and then click List Column User Prop.
- 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.
- Set the property attribute of the swe:control tag in the template file to Total.
For more information, see Step 10.
- 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
- Create a form applet.
- Place the form applet below the list applet in the view.
- Create a field in the business component that the applet references.
- 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.
- In the business component, create a multi-value link.
- 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.
- Compile and test your modifications.
For more information, see Using Siebel Tools.
|