Decimal Property Loosing Digits After Decimal Point
We have a decimal property which is mapped to Decimal(8,0) in database table end. Issue with this configuration is when we try to save a value like 4334.91, Pega truncates the value to 4334 in order to be saved into the Decimal(8,0) column.
For illustration purpose lets assume this property is CurrentYearProfit which is mapped to current_year_profit(8,0) in investment_deals declare index table. CurrentYearProfit is a calculated field which we prefer to keep not rounded at the case level. But in the index table, we prefer to store rounded value in decimal(8,0) scale.
- So, when the clipboard value at CurrentYearProfit is 4334.91
- Value saved to the current_year_profit(8,0) property in declare index table investment_deals is 4334
- Expectation is to have to have 4335 in current_year_profit(8,0)
Is there any way to achieve this without rounding CurrentYearProfit clipboard property or introducing an intermediate property for the declare index?
UPDATE: Data team agreed to update alter the DB column. After changing DB table column as Decimal(8,2), issue was resolved. Need to reindex cases to reflect the value after altering the column.
We have a decimal property which is mapped to Decimal(8,0) in database table end. Issue with this configuration is when we try to save a value like 4334.91, Pega truncates the value to 4334 in order to be saved into the Decimal(8,0) column.
For illustration purpose lets assume this property is CurrentYearProfit which is mapped to current_year_profit(8,0) in investment_deals declare index table. CurrentYearProfit is a calculated field which we prefer to keep not rounded at the case level. But in the index table, we prefer to store rounded value in decimal(8,0) scale.
- So, when the clipboard value at CurrentYearProfit is 4334.91
- Value saved to the current_year_profit(8,0) property in declare index table investment_deals is 4334
- Expectation is to have to have 4335 in current_year_profit(8,0)
Is there any way to achieve this without rounding CurrentYearProfit clipboard property or introducing an intermediate property for the declare index?
UPDATE: Data team agreed to update alter the DB column. After changing DB table column as Decimal(8,2), issue was resolved. Need to reindex cases to reflect the value after altering the column.
- Changing the column does not impact value( 4334 becomes 4334.00)
- Since this is an index table, its required to re-run the indexing to reflect the decimal points