- 29 Aug 2024
- 2 Minutes to read
- Contributors
- Print
Number Formatting in Apps
- Updated on 29 Aug 2024
- 2 Minutes to read
- Contributors
- Print
Learn how you can configure decimal precision for numbers shown in Interactive Table, Table Record and Variable widgets.
This feature is available in release r288 or later.
Widgets that were added to a step before r288 or created by coping such widgets will use the legacy formatting behavior.
For Interactive Table widgets all numbers will be shown with a maximum of three decimal places but without any trailing zeros.
For Variable widgets and Table Record widgets all numbers will be shown with the maximum number of decimal places configured in the now deprecated Decimal places setting of the widget which could be configured in the right side pane.
This legacy behavior can be changed by opening the formatting setting for any field and clicking the Update button in the formatting dialog. This will switch the widget from legacy behavior to the new behavior updating the formatting for all fields of the widget.
Overview
In Apps, number formatting lets you control the decimal precision for visualizing number-type data for Interactive Tables widgets, Table Record widgets and Variable widgets showing object variables. You can configure this for each number-type table field and object property in the Fields section of the widget configuration in the right side pane.
Note: This applies to Variable widgets showing object variables or lists of those (vs. other variables or just one specific field of an object variable), Table record widgets showing selected fields of records (vs. just one specific field of a record) and all configurations of Interactive Table widgets.
Default formatting
By default, Tulip is displaying each value with it's own number of decimal places. This number depends on the decimal places that were recorded when the value was stored into Tulip as well as the absolute size of the value.
Customization
You can customize the number of decimal places through the Number formatting dialog:
- Clicking first on the left arrow button sets the display to 2 decimal places.
- Clicking first on the right arrow button sets it to 3 decimal places.
- Further clicks on the left or right arrows decrease or increase the decimal places displayed, respectively, between 0 and 15.
Numbers are rounded up if the next digit is 5 or higher, and down otherwise.
Number formatting can be reset to the default by clicking the Reset button.
Once configuration is complete, the Number formatting dialog can be closed with the Close button or by clicking anywhere outside of it.
Number formatting is only applied to how numbers are shown in the widgets. The formatting does not affect how data is evaluated for filtering and sorting.