Configuring an Infolet to Display an Aggregate Field Value

This topic describes how to configure an infolet to display an aggregate field value – for example, the following image shows the Active Accounts infolet with the value 1 (which is the aggregate number of active accounts). This topic is part of Configuring Data Visualization Components.

Configuring an infolet to display an aggregate field value: This figure is described in the surrounding text.

To configure an infolet to display an aggregate field value

  1. Create a new workspace.

  2. Create a new applet.

  3. Configure the applet properties as shown in the following table – note that this is the generic applet configuration:

    Property Name Value Comment

    Name

    <AppletName>

    The name of the applet. In this example, the applet name is FINS Contact Open Account Applet.

    Business Component

    <BusComp>

    The name of the business component (for example FINCORP Account whose data is to be displayed. The business component must be defined in the business object specified for any view that uses this applet.

    Class

    CSSSWEFrameInfolet

    The name of a C++ class used to manage the applet. This is the infolet framework class for displaying a single field value (aggregate in this case). The framework invokes the Object Manager aggregation methods and constructs the CSS class based on the business component mapped to the applet.

    Search Specification

    <Search Spec> The search specification to be applied on the infolet.

    Type

    Standard

    By default, the type is Standard.

    The following image shows this sample configuration for the FINS Contact Open Account Applet. In this sample, the search specification considers only open accounts.

    Sample configuration for FINS Contact Open Account Applet: This figure is described in the surrounding text.
  4. For this new applet, navigate to Controls, then create and configure a control for the applet title configuration. In this example, the caption is Active Accounts. For details, see Configuring an Infolet to Display a Value for a Field.

    Note: In this configuration example, you create a total of three controls: AppletTitle, Record Count, and LinkCtrl.
  5. For this applet, create and configure the Record Count control (for example) as shown in the following table.

    Property Value Comment

    Name

    <Record Count>

    The name of the control. In the sample applet, the control name is Record Count. This control name is used in the control user property OverrideDisplayTextWithData.

    HTML Type

    Field

    The HTML type for the Record Count control. This must be Field.

  6. Configure the user properties for the Record Count control as shown in the following table.

    Control User Property Value Comment

    Name

    Count Function Pivot Field

    This aggregate function is used to get the record count, such as the number of accounts. Multiple aggregate functions are mentioned later in this topic.

    Value

    Id

    This is the field on which the aggregation function is applied.

  7. For this applet, create and configure the LinkCtrl control as shown in the following table for the drilldown configuration.

    Property Value Comment

    Name

    LinkCtrl

    The name of the control. This must be LinkCtrl.

    HTML Type

    Link

    The HTML type for the LinkCtrl control. This must be Link.

    Method Invoked

    GotoView

    The method invoked when the link is clicked.

  8. Configure user properties for the LinkCtrl control as shown in the following table.

    Property Value Comment

    View

    <Destination View Name>

    User is navigated to this destination view on drilldown on the value in the infolet.

    OverrideDisplayTextWithData

    <Record Count>

    The control (such as Record Count) that is configured with the business component field value.

    The following image shows the control configured (AppletTitle) for the FINS Contact Open Account Applet.

    Sample configuration for FINS Contact Open Account Applet controls: This figure is described in the surrounding text.

    The following image shows the configuration for the Record Count control and its user property:

    Sample configuration for the Record Count control: This figure is described in the surrounding text.

    The following is a sample configuration for the LinkCtrl control and its user properties:

    Sample configuration for the LinkCtrl control: This figure is described in the surrounding text.
  9. Map the applet web template and web template items.

    For details, see the relevant procedure in Configuring an Infolet to Display a Value for a Field.

  10. Map the presentation model and the physical renderer.

    You must register the new applet (such as FINS Contact Open Account Applet) with presentation model and physical renderer settings. These tasks are needed for automation support and for supporting a custom CSS style class for infolets. For details, see the relevant procedures in Configuring an Infolet to Display a Value for a Field.

About Aggregate Functions Supported for Infolets

The following table lists the aggregate functions that are supported for infolets. Set the appropriate user property on the relevant applet control. In the sample configuration, the Count Function Pivot Field property is set on the Record Count control for FINS Contact Open Account Applet. Note that database aggregate functions are not supported on calculated fields.

Aggregate Function Control User Property Name Value

Average

Avg Function Pivot Field

Field name that requires the Avg aggregate function.

Sum

Sum Function Pivot Field

Field name that requires the Sum aggregate function.

Min

Min Function Pivot Field

Field name that requires the Min aggregate function.

Max

Max Function Pivot Field

Field name that requires the Max aggregate function.

Count

Count Function Pivot Field

Field name that requires the Count aggregate function.

About Aggregate Values and Search Specifications

Also note the following about configuring an infolet to display an aggregate value:

  • If there is any discrepancy in the aggregate value on the infolet, then review the search specification that is applied on the infolet business component. For example, a source business object predefined query (PDQ) is applied along with the search specification on the infolet.

  • When you drill down on the aggregate value link, and if the aggregate value on the infolet does not match the count of records displayed in the destination applet, then review the destination search specification that is applied on the infolet search specification.

If you encounter either of these cases, then refer to the following equations to reconcile the value in the infolet and the record list in the destination applet after a drilldown:

  • Source business object PDQ + infolet search specification. The aggregate value on the infolet.

  • Infolet search specification + destination search specification. The list of records displayed in the destination applet after drilldown.