You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/refguide/modeling/data-types.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Mendix supports the following data types:
19
19
| Boolean | A truth value. |`true` and `false`|
20
20
| Binary | Binary data such as files and images. ||
21
21
| 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, andconfigurable between 8 up to 18 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, from Mendix 11.6.0, is configurable between 8 up to 18 after. In versions below 11.6, a Decimal can only have up to 8 digits after the decimal point. | 3.14, 738000000000.00000001 |
23
23
| Enumeration | One of the values of the given [enumeration](/refguide/enumerations/). | Red, Green, Blue; Todo, Running, Done |
24
24
| <aid="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 |
25
25
| List | A list of objects of a specific [entity](/refguide/entities/). ||
@@ -31,12 +31,16 @@ If you want to change data from one type to another (for example, to display a n
31
31
32
32
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.
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.
36
+
{{% alert color="info" %}}
37
+
Decimal scale is configurable in Mendix version 11.6.0 and above.
38
+
{{% /alert %}}
37
39
38
-
<< Image decimal_precision_setting.png >>
40
+
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.
39
41
40
-
When configuring a decimal precision by adjusting the scale, usages of the decimal in frontend elements such as datagrids will also need to be adjusted to respond to the changes. By default frontend components 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.
When you adjust the scale of a decimal precision, you will also need to adjust usages of the decimal in frontend elements such as datagrids to respond to the changes. By default, frontend components 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. For example, `1.2345` will result `1.20` when selecting 2 and `1.23450` when selecting 5. When `Auto` formatting is specified, the UI will display the value as it is stored.
0 commit comments