Decimal value getting round off after 7 digits.

Certified Associate Developer

We are facing issue like the value is Number(Decimal) when user enters - 1595739.56 it gets round of to – 1595740. Which is a concern here. Also any number which is of 7 or more than 7 digit are getting round of.

We understand appian recommends the uses of ‘text field’ instead of floating point field, but this will lead to the column type changes in Database because those decimal columns can either be calculated in appian or in database stored procedures, hence as converting the column from decimal to varchar will required us to type cast them from varcharToDecimal before doing any calculation s and those are many fields which are used in calculations. Any urgent help/suggestion is really great help to me to progress.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Your problem is a well known one.  You said you have 15 to 18 decimal digits, well that's more than Java Double holds.  It only has 15-16 significant digits, with a whole swath of values that can't be properly expressed at that precision.  Answer:

    Appian, going to make this a Feature Request thread.  Create a new datatype that maps to Java BigDecimal.  I seriously don't know how you haven't already.  BigDecimal was invented because Double isn't good enough for financial calculations.  People use your platform to make business apps that do financial calculations.

Reply
  • 0
    Certified Lead Developer

    Your problem is a well known one.  You said you have 15 to 18 decimal digits, well that's more than Java Double holds.  It only has 15-16 significant digits, with a whole swath of values that can't be properly expressed at that precision.  Answer:

    Appian, going to make this a Feature Request thread.  Create a new datatype that maps to Java BigDecimal.  I seriously don't know how you haven't already.  BigDecimal was invented because Double isn't good enough for financial calculations.  People use your platform to make business apps that do financial calculations.

Children
No Data