Siebel Advisor Administration Guide > Working with Advisor Configuration Tables >

Cell Functions for Advisor Configuration Tables

When you are working in Configuration tables, you can use javascript expressions in the table cells to refer to other table columns, perform calculations, and simplify the amount of data you enter into a cell. When a cell with a function is referenced, the calculation is performed and the application displays the result of the calculation.

When using cell functions, use the following rules:

  • Create an output column for cell functions
  • Use only javascript expressions
  • Enclose all cell functions in parentheses

    For example, (CAR.PRICE-DISCOUNT)

About Referring to Other Table Columns

Refer to columns in Feature tables by using the expression TABLE.COLUMN. For example, to refer to the column PRICE in the COLOR Feature table, use the expression (COLOR.PRICE).

Refer to Configuration tables by using the expression COLUMN. For example, to refer to the column SPEED in the MODEM Configuration table, use the expression (SPEED).

In cell functions, you can reference an unlimited number of columns.

About Performing Calculations

Use standard javascript syntax to perform calculations in a table cell.

For example, you can calculate the total quantity of car alarms and stereo systems by using the following calculation: ALARM.QTY+STEREO.QTY. This example adds the value in QTY column of the ALARM table to the value in the QTY column of the STEREO table and displays the total in the application that referenced it.

Nested Cell Functions

You can nest cell functions, but be aware of how the nested expression is evaluated. Cell functions are evaluated from left to right and bottom to top, as in Figure 5.

Figure 5. Order of Evaluation for Nested Cell Functions

The numbers in this chart represents the order in which functions are evaluated. A larger numbered table can reference values in a smaller numbered table.

For example, table 1 has a column RESTRAINT_PRICE with cell function (LEASH.PRICE+HARNESS.PRICE).

In this case, table 8 (MAIN) could have a column TOTAL_PRICE with (RESTRAINT_PRICE+PET.PRICE).

You cannot reverse the cell functions and have the second cell function in table 1, and the first in table 8 due to the order of evaluation.

Because tables are evaluated from left to right, you also need to be careful about which cells you reference. When referring from a Configuration table to a Feature table, you can only refer to cell functions that are in your table to the left, or to a literal anywhere in the Feature table. In Configuration tables, you can reference literals anywhere in any Configuration or Feature table.

Cell Function Example

In this example, you add a cell function that calculates the customer's spending capacity based on two selections: salary, and cash available for a down payment.

To add an Advisor pageset cell function

  1. Navigate to Administration - Product > Advisor Pagesets > My Pagesets.
  2. Select a pageset.
  3. On the Configuration Tables tab, select the MAIN Configuration table.
  4. Select New Record from the Designer tab menu.

    A new record appears.

  5. Name the column SPEND_MAX and enter Output for the type of column.
  6. In Edit view, enter the following formula into all valid configuration rows of the new SPEND_MAX(Output) column: ((SALARY.AMT*.75*.05*5)+CASH.AMT).
Siebel Advisor Administration Guide