Creative Ways of Personalizing Search Results

Index
Display Grp Headers & Totals w/Functions
Display Totals w/Functions,without Grp Headers
Display Functions in Group Headers
Display Multiple Functions in Subtotals

This topic is designed to provide alternate methods of personalizing the search results page of a view in order to provide creative results.

There are two fields that we will be using to create these views:

  1. Group Header - group headers appear at the top of a group of records in the search results. A group header may consist of one or more fields, with each field representing a column in the header. The first column will always represent the grouping field. A single group header will include a line displaying the field labels followed by a line displaying the field values. (e.g. Customer Code in e.g. below)

    • A single group of records may be preceded by more than one group header. The user-defined groups for a single view will determine the granularity of the information shown in the results.

    • A field appearing in the group header may have been assigned a function. In this case, the function name prefixes the field label. For example, if the field label is Customer Name, and the Maximum function is assigned to it, the label Maximum Customer Name appears in the group header, instead of simply Customer Name. Multiple functions may have been assigned to a field. In this case, a new column is introduced in the group header for each function. For example, if the field label is Margin Percent, and the Minimum and Maximum functions were assigned to it, then three columns will appear in the header; the first will represent the label of the grouping field; the second will be titled Minimum Margin Percent; and the third will be titled Maximum Margin Percent. Their respective values will be shown on the next line. Note: Grouping fields cannot be assigned functions.

    • When you initially create a user-defined group, you are actually introducing a group header in the search results. The grouping field that was used to create the user-defined group is what is used to determine when a new header is inserted in the results. For example, if the Customer Code field was selected as a grouping field, thus creating the group titled Group: Customer Code, then each time a new customer code is encountered in the results, a group header is inserted.

    • Removing the fields assigned to a user-defined group has the effect of removing the group header from the search results.

  2. Totals - totals may be displayed in search results only if the selected Display Search Results With property includes grand totals or subtotals. In the case of subtotals, the user-defined group for which subtotals are desired must also have been assigned the Show Subtotal property.

    • Subtotals appear at the end of each group of records associated with the user-defined group for which the Show Subtotal property is active. The title becomes Group Totals and it is prefixed with the value of the grouping field for that user-defined group. For example, if the grouping field was Customer Code, and you are looking at the data for 02West, then the title will be Group Totals for Customer Code 02WEST. Following the title line, one or more subtotal lines will appear, one for each of the different functions selected. For each function subtotal line associated with a user-defined group, the total for each field assigned that function is displayed.

    • In the case where multiple user-defined groups have been set up, then multiple group totals will appear at the end of the results. The first group total to appear beneath the result details represents the subtotals for the finest-grained user-defined group; the next group total to appear beneath the finest-grained group total represents the next-finest-grained user-defined group, and so on.

    • The last set of totals to appear in the search results represents the grand totals. The title for this section becomes Overall Totals. As with group totals, following the title line, one or more lines will appear, one for each of the different functions selected.

    • Grand totals include the totals for all records matching the specified search criteria, not simply for those records shown on screen.


Back to top

 
Example 1: Displaying Group Headers and Totals with Functions

In this example, we want the search results to display the Customer Code and Customer Name in the group header each time a new staqtistical customer value is encountered in the search results. The data is sorted in ascending order and subtotals/grand totals will display because functions are selected. Here is a sample of the Invoice History view we want to create:

  • The Customer Code field is selected as a grouping field. Consequently, a new user-defined group, Group: Customer Code, must be created, and the Customer Code field will be moved automatically into the new group.

  • The Customer Name field is moved manually into the group.

  • The Display Search Results With property is set to Details, Subtotals, and Grand Totals, and the Show Subtotal property is selected for the Customer Code user-defined group. The sort order is set to Ascending.

  • The Sum function is applied to the Quantity to Ship, Unit Cost, Extended Unit Cost and Domestic Line Extension fields.

  • The Count Distinct function was applied to the Product Code field.

Here is an example of the personalization done for the Search Results tab for the Invoice History Sample view:


Back to top

 
Example 2: Displaying Totals with Functions/without Group Headers

In certain cases, displaying header information may not be necessary; however, function values can still be calculated. Customizing the search results to create grouping fields and then moving the grouping fields to the Result Details group will result in this type of display.

Here is a sample of the Invoice History view we want to create:

  • The Customer Code and Fiscal Period grouping fields are moved out of their respective user-defined groups into the Result Details group.

  • The Sum function is applied to the Quantity to Ship, Unit Cost, Extended Unit Cost and Domestic line Extension fields.

  • The Count Distinct function is applied to the Product Code field.

Here is an example of the personalization done for the Search Results tab for the Invoice History Sample 2 view:


Back to top

 
Example 3: Displaying Functions in Group Headers

In the following example, we have added additional fields to the group headers, along with additional functions on the fields in the group header sections.

Here is a sample of the Invoice History view we want to create:

  • The Quantity to Ship was added to the first user-defined group and the Sum and Average functions were selected for it.

  • Fiscal Period was added to the second user-defined group and the Maximum and Count functions were applied to it.

Here is an example of the personalization done for the Search Results tab for the Invoice History Sample 3 view:


Back to top

 
Example 4: Displaying Multiple Functions in Subtotals

In this example, we have a user defined group with subtotals/totals and group totals (i.e. function values). These totals are displayed beneath the (search) result details.

Here is an example of the Invoice History view we want to create:

  • The functions Maximum, Sum and Average have been assigned to the Domestic Line Extension field.

  • In addition, the Sum function has been assigned to the Quantity to Ship, Unit Cost and Extended Unit Cost.

Here is an example of the personalization done for the Search Results tab for the Invoice History Sample 4 view:


Back to top

 
Back