/
How to Set the Number of Displayed Decimals in User Input
How to Set the Number of Displayed Decimals in User Input
Whenever there is a user input on the Line or Header level, the displayed value is automatically set to two decimals. Internally, the number is stored with higher precision and it is also used at this higher precision in the calculation logic.
You can change the user input format to match the Format Type configured in the logic.
- In the calculation logic editing mode, click the Parameter Details button.
- Add a new line.
- Enter Parameter Name which must exactly match the parameter defined in the logic.
- In Format, specify the number of decimals that will be displayed in the user input field, e.g., ##.0000 for four decimals.
- Click Apply and then save the logic.
You can also define and set the parameter using a Groovy script:
api.userEntry("User Entry") def p = api.getParameter("User Entry") p?.setConfigParameter("formatType", "###.00000")
Input builders the right way:
api.inputBuilderFactory() .createUserEntry("Market Value") .setFormatType("###.0000") .buildContextParameter()
Note: If you try using .setConfigParameter("formatType", "###.0000") after building the context parameter, the system will throw weird exceptions at runtime.
, multiple selections available,
Related content
How to Adjust Rounding of Displayed Outputs
How to Adjust Rounding of Displayed Outputs
More like this
How to Round Numeric Value
How to Round Numeric Value
More like this
How can I use more than 4 decimals in in-memory tables
How can I use more than 4 decimals in in-memory tables
More like this
Is it possible to change precision for Result Price on LPG?
Is it possible to change precision for Result Price on LPG?
More like this
Input Functions
Input Functions
Read with this
Input Builders
Input Builders
Read with this
Found an issue in documentation? Write to us.