Aggregation-Rule: Aggregation Fields tab

About the Aggregation Fields tab

About Aggregation fields

What the Aggregation fields tab shows

How to use the Aggregation fields tab

About the Aggregation Fields tab

Use this tab to Set the criteria and aggregation functions for aggregating Input and Output-Events

About Aggregation fields

An Aggregation-Rule works with four types of field, taken from the set of fields that comprise the Business-Document you selected in the General tab. The examples used in the following description of these fields are based on the sample multi-segment invoice Input-Event illustrated below:

 

 

 

 

 

INVOICE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HEADER

 

 

 

 

Order number

Shop code

Customer number

Delivery Address

 

657

 

58765

878

10, Bacon Street  - New York

 

DETAILS

 

 

 

 

Order number

Article reference

Quantity

Unit price

Vat_rate

657

15

5

200.00

20.60

657

88

3

100.00

20.60

657

15

2

200.00

20.60

657

15

3

200.00

20.60

 

 

 

 

 

FOOTER

 

 

 

 

ORDER NUMBER

LINES

TOTAL

TOTAL VAT

TOTAL NET

657

4

700.00

144.20

844.30

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The four types of field are:

Criteria fields

Define which fields to extract and use as sort criteria. You do not enter any conditions for this field. Instead, you drag-and-drop the sort criteria fields to the Criteria fields node on the left hand side. The system then searches for fields which have the same value. If you do not define any criteria fields, the system aggregates ALL the fields in the Business-Document.

Example

If you set the Article Reference as the Criteria field and then apply this aggregation criteria to the DETAILS structure, the system groups the DETAILS records into two sets: the first set groups lines possessing the value 15 and the other the lines possessing the value 88.

Aggregate fields

All selected fields are aggregated using the aggregation functions (Min, Max, Sum, Average, Count) that you specify in the Formula column of the Aggregated Fields tab. Aggregate fields must always be Integers (Signed, Packed or Numeric) or Decimal Numbers (Signed, Packed or Numeric).

Example

If you want to find the total price of all Article reference 15 records, select the Unit price field and specify Sum as the formula.

Report fields

For fields that are neither Criteria nor Aggregate fields, you can specify a fixed value as a label to describe what the aggregated fields represent.

Example

To create a label to describe the aggregated Article reference 15 records, select the Order number field and enter 'Total for Article reference 15' as the text to display. This produces a single label for the aggregated Business-Document, assuming that the Order number field is alphanumeric and long enough to contain this text string.

Other format fields

For any other fields that you do not explicitly reference as either Aggregate, Criteria, or Report fields, the value depends on the Report function that you specify on the Aggregation-Rule General tab.

For each Other Format field, you designate whether what appears in the aggregated field is the value taken from the first or the last Business-Document field aggregated.

Since you do not select these fields explicitly, they are implicitly defined as Other format fields. You do not have to drag and drop any fields to define them as 'Other format fields' since they do not appear on the Interface. You can define multiple Report fields, regardless of the Report function that you specify.

What the Aggregation fields tab shows

The Aggregation fields tab is divided into three areas, as schematically illustrated in the following diagram.

Icon bar

 

Business-Document tree structure

Rule name

Formula

Edition

Value

Criteria fields

 

Always grayed out

Always grayed out

Always grayed out

Aggregate fields

 

Drop-down list of Aggregation Functions

Check box

Always grayed out

Report fields

 

Always grayed out

Always grayed out

User field

How to use the Aggregation fields tab

From the Business-Document tree structure in the right pane, drag-and-drop fields to the following nodes in the left pane:

  • Criteria fields node: The Criteria fields determine which records to aggregate. You can add up to 100 records to the list of Criteria fields. The total accumulated length of these fields must not exceed 4000 characters.
  • Aggregate fields node: The Aggregate fields determine which mathematical operations the system is to perform on the selected records. For each record:
    • select an aggregation formula from the Formula drop-down list
    • select the Edition check box if you want AccountingIntegrator Rule Engine to write a log of each of the fields included in the aggregation process.
      Note
      : This option greatly prolongs the processing time and therefore represents a large processing overhead if implemented.
  • Report fields node: For fields that are neither Criteria nor Aggregate fields, you can add them to the Report fields node and enter a value manually in the Value field. You can enter any value that matches the field description. For example, a number for a Numeric, an alphanumeric value for a String.

Back to top

Related Links