Calculated attributes

A calculated attribute is a read-only field whose value is calculated based on a specified formula.

When you save a form that contains calculated attributes, Unica Marketing Operations checks the formulas to ensure they are valid.

A calculated attribute has the following additional basic options.

Formula syntax

You can perform the following binary operations.

*
*
*
*

You can perform the following operations on an arbitrary number of comma-separated operands.

*
Sum: for example, Sum(Salary, 1000, Bonus)
*
Avg: arithmetic average, for example, Avg(BudgQtr1, BudgQtr2, BudgQtr3)
*
Min: select the minimum value, for example Min(IQ, 125)
*
Max: select the maximum value, for example Max(Sale1, Sale2, Sale3, Sale4)

An operand can be any of the following.

*
*
Calculated attribute example

Assume the Wages form contains the following currency fields: BaseSalary, Bonus, Insurance, and FedTax. You could create a new calculated field named Net pay, and enter the following formula: BaseSalary+Bonus-FedTax-Insurance

Example to avoid

Since you can reference one calculated field within another, take care to avoid infinite recursion. For example, consider a form with the following attributes.

*
Salary: an integer or money attribute
*
Commission = Salary + (Bonus * 0.10)
*
Bonus = (Commission * 0.5) + 1000

The Commission and Bonus attributes refer to each other, creating an infinite loop when the system attempts to calculate the values.

Grid attribute example

Calculated fields can be used in grids, as well as on forms. A simple example is if a grid contains columns for units and cost per unit, you can create a column for the grid to represent the total cost: Units * CostPerUnit



IBM Unica Marketing Operations
 
8.5.0
For more information, see our support and community site: Customer Central