Global variables
When designing MM-Talk-based tables, it regularly happens that values beyond a certain formula context are required, i.e. there may be partial calculations that are calculated in several columns. These values to be used multiple times can arise in two places, either on the basis of the table input object (e.g. the evaluated portfolio) or on the basis of the table row object (e.g. the portfolio item associated with the row).
To avoid double calculations and formula copies, such values can be defined centrally in tables in preformulas and assigned to global variables. The table preformula is responsible for calculations based on the input object. The row preformula is responsible for calculations based on the row object. Global variable definitions are written in the following form:
$$Variablenname:= Wert;
A variable is therefore defined as global by placing a double dollar sign in front of the name when it is assigned or used.
Global variables can be defined in tables in preformulas and row preformulas and used in column formulas. The variables from the preformula can be used in line preformulas. Global variables cannot be used in formulas for other elements (column headings, table titles, footer elements). Any definitions in column formulas are ignored.
To integrate the line prefix formula into the tables, please also read the section Line prefix formula.