It is possible to format a number-type field so that it is displayed in a certain way. These options are available in the specific configurations of number-type fields.
The available options are the following:
- Number format (Number format): Allows you to choose which format to apply to the display of number-type fields:
- Plain text (Plain text): The number will be displayed without any formatting.
- Currency (Currency): The number is displayed as a currency, with decimal positions, language formats, and the selected currency.
- Percentage (Percentage): The number is displayed as a percentage, with the indicated decimal positions, and the percentage symbol (%).
- Scientific (Scientific): At this moment it behaves like plain text, but it 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, it indicates the decimal digits to display. If not specified when the setting is Currency, it will display the default decimal digits that the selected currency and language have. If not specified when the setting is Percentage, it will round to the next integer.
- Locale/Language: For the Currency setting, it indicates the representation. For example, the value es_ES shows the decimal separator with a dot, thousands separator with a comma, and the Euro symbol at the end. If we want each user to have their localization we must select user locale; with this each user will have the format of their localization.
- Currency: For the Currency setting, choose the currency to display.
Depending on this configuration, the appropriate format is applied in the document view. Let’s see examples of recommended formats:
Currency representation in Spain:
It is displayed as:
Percentage representation:
It is displayed as:
Compatibility with customized Javascript code
This configuration is not compatible with JavaScript. To ensure backward compatibility, in advanced administration there is a field called “Js compatibility” (metadatatype). When this field is checked, Athento will use the customer’s custom configurations instead of the number-type field configuration. We recommend migrating custom JavaScript code to the field automations which are compatible with this functionality.
How to enter a monetary value in a number-type field?
IMPORTANT!
If you are using a number-type field, when you enter the value you must only
use the dot to indicate decimals. You must not enter any
other separator.