Skip to content

Commit dae462f

Browse files
initial changes for decimal scale
1 parent 90ca4fa commit dae462f

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

content/en/docs/refguide/modeling/data-types.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Mendix supports the following data types:
1919
| Boolean | A truth value. | `true` and `false` |
2020
| Binary | Binary data such as files and images. | |
2121
| Date and time | A point in time consisting of a date and a time component accurate up to milliseconds. | Thursday, 12 February 2015, 14:50:36 |
22-
| Decimal | A high-precision fractional number. The Decimal type can be used for high-precision calculations. Use this type to represent amounts of money for example. A Decimal can have up to 20 digits before the decimal point, and up to 8 after. | 3.14, 738000000000.00000001 |
22+
| Decimal | A high-precision fractional number. The Decimal type can be used for high-precision calculations. Use this type to represent amounts of money for example. A Decimal can have up to 20 digits before the decimal point, and configurable between 8 up to 18 after. | 3.14, 738000000000.00000001 |
2323
| Enumeration | One of the values of the given [enumeration](/refguide/enumerations/). | Red, Green, Blue; Todo, Running, Done |
2424
| <a id="integer-long"></a>Integer/Long | A whole number between -(2^63) and 2^63 - 1. The attribute types AutoNumber, Integer and Long map to this data type. | -42, 0, 123 |
2525
| List | A list of objects of a specific [entity](/refguide/entities/). | |
@@ -30,3 +30,13 @@ Mendix supports the following data types:
3030
If you want to change data from one type to another (for example, to display a number as part of a message in a text box) you will usually need to use an expression to do this. See [Expressions](/refguide/expressions/) for more information on what is available.
3131

3232
An exception is converting an Integer/Long to a Decimal, where conversion is done implicitly if you provide an Integer/Long where a Decimal is expected.
33+
34+
## Configurable decimal scale {#configurable-decimal-scale}
35+
36+
As mentioned above the scale of a decimal is configurable between the values of 8 and 18, where precision will always be scale + 20. The setting under `App Settings` will apply to the entire application.
37+
38+
<< Image decimal_precision_setting.png >>
39+
40+
When configuring a decimal precision by adjusting the scale the UI will need to be adjusted to respond to the changes. By default datagrids format decimals with a fixed scale of 2. When specifying `fixed` formatting, the UI will display the value rounded or padded to fit into the fixed format. Eg: `1.2345` will result `1.20` when selecting 2 and `1.23450` when selecting 5. When `Auto` formatting is specified, the UI will disply the value as it is stored.
41+
42+
<< Image decimal_precision_formatting.png >>
45.5 KB
Loading
91.9 KB
Loading

0 commit comments

Comments
 (0)