Redundancy allows you to store a value in a Database table instead of calculating it every time it is needed. It improves data retrieval at the cost of data update performance.
Global formula attributes and Inferred attributes can be defined as redundant by checking the Redundant column in the Transaction editor:
The Redundant column is, by default, hidden. You can include it in the Transaction editor by using the Column Chooser:
In order to open the Column Chooser, right-click on the column headers row in the Transaction editor, and select it from the contextual menu; then, select the Redundant option within the Column Chooser.
Note that once the Redundant column is included in the Transaction editor, the redundant check is enabled only for those attributes that may be defined as redundant.
When an attribute is defined as redundant, the next Database Reorganization will add it to the corresponding table and will populate it values.
GeneXus keeps redundant attributes up to date as changes are made to the Database.
A typical Formula definition follows. See below for comments.
CustomerTotal = sum(InvoiceTotal)
CustomerLinesTotal = sum(InvoiceLineTotal)
InvoiceTotal = sum(InvoiceLineTotal)
InvoiceLineTota = ItemPrice * InvoiceLineQty
Formulas that aggregate more than one level of non-redundant formulas will not be correctly maintained.
Navigation diagram shows warning message: spc0043: CustomerLinesTotal is not instantiated in grid ...