Value Class - Formula
- What calculations can I perform with the Formula option?
- What arithmetic operations and functions are possible?
- How are formulas calculated?
- What should I keep in mind when using comma (,) and period (.) as decimal separators?
- How can I use values from a Record (of a Repository) within a Formula?
Tip
Summary: The Formula option in COSMO\u0027s Data Integration Framework allows calculations to be executed using Variables, arithmetic operations, and functions. The user language is used for calculations, and only numerical values can be calculated. Variables must be used if values of a Record (of a Repository) should be used within a Formula.
With the Formula option, calculations can be executed. It is possible to use Variables, which are resolved before the calculation (see Mapping Variables). After the calculation, the value can be converted and then formatted.
The following table displays the arithmetic operations and functions that are possible (in order of calculation).
Function | Formula | Result |
---|---|---|
Variables | [gross] – [VAT] | <net amount> |
Bracket | (1 + 4) * 3 | 15 |
Power | 4^2 | 16 |
Modulo | 3 % 4 | 3 |
Multiplication | 2 * 3 | 6 |
Division | 10 / 2 | 5 |
Addition | 3 + 4 | 7 |
Subtraction | 10 – 4 | 6 |
Formulas are calculated in the user language. Only numerical values can be calculated. This is especially important for the usage of comma (,) and period (.) as decimal separators.
If values of a Record (of a Repository) should be used within a Formula, then they must first be stored in Variables. The values of the variables can then be accessed in the Formula. For more information, see Mapping Variables.
Feedback
Submit feedback for this page .