Retrieve decimal value having more than 7 digits after decimal places (from third party database)

Hi All,

In third party database, we have a column (number datatype containing decimal values - NUMBER(15,12)) which can have more than 7 digits after decimal place. In database, for example, the value is 33.3333333333

but when we are fetching the data via query entity, it is coming as 33.33333 and not the entire value. Datatype we have used in CDT is Number (Decimal) and xsd type xsd:decimal. We have also tried xsd:double in CDT but the result is same.

Is there any range restriction on Number(Decimal) ?

How to fetch the entire value from database?

Kindly advice.


Thanks and Regards,

Diksha

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to dikshag

    This is your trouble right here.  You CAST it as text to the CDT.  That causes Appian to do all the implicit conversions it thinks it's supposed to do.  In general, Appian only displays 7 digits, and it assumes that's what you want because you haven't told it to do different.

    use fixed(whatever it is, 15) to output up to 15 digits of the decimal.  The output of the fixed function is a text that can go into your CDT.  You'll have to build the logic as part of a type constructor to take data from query and successfully map it to the CDT.

Children
No Data