You can calculate the value of an attribute by entering an expression.
For example, a view object based on OrderItemEO may have a transient attribute called LineTotal. To implement a calculation for that attribute, perform the following steps:
1. Invoke the attribute editor for LineTotal.
2. On the View Attribute panel:
a. Select the Expression option for Value Type. Expressions can use the Groovy expression language and can reference attributes from the view object definition.
b. Enter the calculation for Value: UnitPrice*Quantity.
c. On the Dependencies panel, shuttle Quantity and UnitPrice to the Selected list. This ensures that the value for LineTotal is recalculated whenever the value for either Quantity or UnitPrice changes.