It is possible to format a number type field to be displayed in a certain way. These options are available in the specific settings for number type fields.
The following options are available:
- Number format: This allows you to choose what format to give to the display of the number fields:
- Plain text: The number will be displayed without any formatting.
- Currency: The number is displayed as a currency, with decimal places, language formats, and the selected currency.
- Percentage: The number is displayed as a percentage, with the decimal places indicated, and the percentage symbol (%).
- Scientific: Currently behaves as plain text, but is offered for future use.
- Human friendly: For the Currency and Percentage settings, it enables or disables the display of units, locale, percentage symbol, etc... Disabling it makes the field behave as if it were plain text.
- Decimal places: For the Currency and Percentage settings, indicates the decimal places to be displayed. If not indicated when the configuration is Currency, it will show the default decimal places for the selected currency and language. If not indicated when the setting is Percentage, it will round to the next integer.
- Locale/Language: For the Currency configuration, it indicates the representation. For example, the value es_ES, shows the decimal separator with a period, the thousands separator with a comma, and the Euro symbol at the end.
- Currency: For the Currency setting, choose the currency to display.
Depending on this setting, the appropriate formatting is applied in the document view. Let us see examples of recommended formats.
Representation of currencies in Spain:
It would be shown like:
Representation of percentages. In the edition, numbers between 0 and 1 must be entered to represent values between 0% and 100%:
It would be shown like:
Custom Javascript compatibility
This configuration is not compatible with custom JavaScript. To ensure backward compatibility, from the advanced administration there is a field called "Js compatibility" (metadatatype). When this field is checked, Athento will use the customer's custom code instead of the number type field settings. We recommend you migrate custom JavaScript code to the field automation that is compatible with this feature.
How to enter a currency value in a number field?
Important!
Dots (.) are used as decimal separator. Do not enter any other separator character.
Athento will format the number according to the locale.
Comments
0 comments
Please sign in to leave a comment.