Skip to main content
June 8, 2022
Question

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

  • June 8, 2022
  • 8 replies
  • 0 views

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

    8 replies

    stefanhelzle0001
    Brainy
    June 8, 2022

    Appian does always format the value when displaying it on screen. This formatting includes limiting the number of decimal digits. The value itself will not change.

    agamb0001
    June 8, 2022

    Hi [mention:3c7f7c8a158d4aa99dc7395387084715:e9ed411860ed4f2ba0265705b8793d05] ,

    Like Stefan mentioned, Appian would automatically format the value for viewing but the actual value wouldn't change.

    If you would like to display the exact value on UI, you could use functions like "fixed"

    [View:https://docs.appian.com/suite/help/22.1/fnc_text_fixed.html]

    If you are doing some calculations, you could also refer the below

    [View:https://community.appian.com/support/w/kb/707/kb-1426-unexpected-results-on-decimal-calculations-and-rounding]

    dikshagAuthor
    June 8, 2022

    Thank you [mention:126a676c85024855948336691b0a7b92:e9ed411860ed4f2ba0265705b8793d05] and [mention:d8b421a354554ef089fa196070da6bf2:e9ed411860ed4f2ba0265705b8793d05] for your quick replies but the value itself is getting changed. While querying it via query entity from database only, we are not getting the entire value. We are already converting that decimal value into text before displaying it on screen

    agamb0001
    June 8, 2022

    Hi [mention:3c7f7c8a158d4aa99dc7395387084715:e9ed411860ed4f2ba0265705b8793d05]

    Can you show your interface code how you are showing the value ?

    Also, did you use the function "fixed" ?

    How are you converting the value to text

    dikshagAuthor
    June 8, 2022

    No, we haven't used the function fixed. We type cast it to text with CDT. But the concern here is not while converting from decimal to text. It is working fine. The concern is while fetching the data from database itself, we are not getting the entire value.