preciseDecimal

preciseDecimal

This setting was added in Profound.js version 7.14.0.

Enabling this setting can potentially break applications that were not coded for precise decimal.

Support for precise decimal values in SQL result sets is limited to the IBMi, odbc, and mssql drivers. With the odbc and mssql drivers, values with more than 15 digits can still lose precision, because of limitations in third-party packages.

Description

This setting controls the automatic definition of precise decimal values.

Valid Values

  • false (default) - Never automatically define precise decimal values;

  • true - Always automatically define precise decimal values;

  • number - A number of digits. Decimal values with this number of digits or more are automatically defined as precise decimal.

What the Setting Affects

  • Strongly typed field definitions produced automatically by the framework from external definitions – for example external RLA database files, printer files, and Rich Display Files;

  • Rich Display File bound fields with the Decimal type;

  • SQL result sets containing decimal values, where supported;

  • Low Code RDF, Module, and Profound API CRUD generation over database tables containing decimal columns. The setting auto-populates the Precise decimal checkbox on input/output parameter settings;

  • Low Code Module input/output parameters defined with IBM i / RPG lengths.

Example

Automatically use precise decimal for any value with 16 or more digits, which is where a JavaScript number begins to lose precision, while leaving smaller values on the faster native representation:

preciseDecimal: 16

For information on how to modify this setting, see Configuration File.