Hi, We are trying to retrieve float values from database but the value retu

Hi,
We are trying to retrieve float values from database but the value returned is rounded to 1 decimal.
For eg: When the value in database is 100.54, queryrule and queryentity return value as 100.5 whereas executequery returns 100.54.
We modified the xsd to include the JPA annotation columnDefinition for an attribute which didnt change the output of the query rule. Please see attached document for further info and let me know if I am missing anything.
Thanks

Appian_RoundingIssue_Forum.docx

OriginalPostID-187452

OriginalPostID-187452

  Discussion posts and replies are publicly visible

Parents
  • @shivakanth - The issue is, the value fetched from the database using queryentity or queryrule) is shown as 154037.4. When I tried fixed(todecimal(ri!value), 2) it displayed 154037.37. See attached image.
    @rahul - How did that work for you ? It throws a datatype mismatch when we try to publish the datastore. (The data type in the db is FLOAT)

    The datatype for all 3 columns in the database is FLOAT.
    IF you refer the word attachment, in the XSD, the columnDefinition is added only to the first element. For element GST_AMOUNT, even when the columnDefinition annotation is not defined, Appian is returning true value from db however for element INVOICE_AMOUNT_EX_GST the columnDefinition being defined, the value is still rounded off to 1 decimal.
    Why is Appian treating the 3 elements differently?
  • @Nikhil, It seems you define and test INVOICE_AMOUNT_EX_GST same as element GST_AMOUNT without column Definition annotation
Reply Children
No Data