Example: Workbook Adapter with Additional Field

This scenario shows how the Workbook Adapter function type processes the data from the Input Model Table. Also, it allows for an additional field to be included in the result that is calculated through a formula maintained directly in a workbook sheet.

Input

You use this table as an input function:

Input Model Table
Customer Product Quantity Amount
CUST01 PROD01 1 10
CUST02 PROD02 2 20
CUST03 PROD03 3 30
CUST04 PROD04 4 40
CUST05 PROD05 5 50
CUST05 PROD0X 50 500
CUST06 PROD06 60 600

On the Signature tab, you can specify the following data:

Signature Tab
Granularity Selection Action
Customer Customer Total Amount
Product Product  
  Quantity  
  Amount  
You maintain the above fields to perform the following tasks:
  1. Enter the fields Customer and Product in the Granularity column as they contain unique data records. This way, you make sure that the system processes data records from the input data in a grouped manner. In addition, you ensure that the system considers all records from the input function for processing.

  2. Make sure that the fields Customer, Product, Quantity, and Amount (which can also be seen in the Input Model Table) are included in the result table.

  3. Add another field used to create a formula which can be included in the final result.

In the Calculation Rules worksheet, there are two tabs (Input and Result). They contain the fields maintained in the Signature section.

Customer Product Quantity Amount Total Amount
    0 0 0
         

Both the Input and the Result tab contains the table above.

The table below shows the dummy data for the tabs:

Input Tab
Customer Product Quantity Amount Total Amount
ARR21 SHOES 143 300 0

The formulas shown below are used for the Result tab:

Result Tab
Customer Product Quantity Amount Total Amount
=Input!A2 =Input!B2 =Input!C2 =Input!D2 =C2*D2

By maintaining these formulas, you are cross-referencing the values captured by the first four fields of the Input tab. The additional field Total Amount contains a formula which multiplies the value of the Quantity and Amount fields.

Output

Final Output Table
Customer Product Quantity Amount Total Amount
CUST01 PROD01 1 10 10.00
CUST02 PROD02 2 20 40.00
CUST03 PROD03 3 30 90.00
CUST04 PROD04 4 40 160.00
CUST05 PROD05 5 50 250.00
CUST05 PROD0X 50 500 25,000.00
CUST06 PROD06 60 600 36,000.00

The first four fields (Customer, Product, Quantity and Amount) just capture the data from the Input Model table because the formula created refers to the input. The additional field (Total Amount) multiplies the value from the Quantity and Amount fields accordingly.

In this example, only one line of formula was created. In any way, the function considers all records from the input function for processing because the fields have been maintained in the Granularity fields from the Signature section.