Hi All #RoundingOff #FloatToDecimal #XSD 1) We have a CDT wherein one of it

Hi All #RoundingOff #FloatToDecimal #XSD
1) We have a CDT wherein one of its field was defined with 'float' property (mapped to the table with the type of float as well in the database).
This is how that field in the XSD looked like.
           <xsd:element name="FundAmt" nillable="true" type="xsd:float">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Column(name="fund_amt", columnDefinition="FLOAT")</xsd:appinfo>
</xsd:annotation>
</xsd:element>
          
Now in the process, the above CDT field holds the value = 6244676.65. When this is passed to 'Write to Data Store' node (in order to insert the value to the table in the database) - Appian is converting is to 6244676.50 automatically which is bit strange as there is NO explicit rounding done in either Appian process or Database end.

2) Now if I go to the database and manually update this figure in the table from 6244676.50 to the correct one ie, 6244676.65 and ...

OriginalPostID-203985

OriginalPostID-203985

  Discussion posts and replies are publicly visible

Parents
  • Hi Vishnu - thank you for your response.I went through this link and under "Mapping CDT Fields to RDBMS Columns" section - the XSD type = float has Number (Decimal) in Appian and "float" as data type in the mentioned databases, which was my case earlier which wasnt working for me - wherein in XSD I specified 'float'.

    If we are saying that 'float' should not be specified in the XSD definition for any fields and should always be Number(Decimal), Appian should not allow this to upload in the system, however since it does, then why its some random values which are giving this strange behavior and not all values.
Reply
  • Hi Vishnu - thank you for your response.I went through this link and under "Mapping CDT Fields to RDBMS Columns" section - the XSD type = float has Number (Decimal) in Appian and "float" as data type in the mentioned databases, which was my case earlier which wasnt working for me - wherein in XSD I specified 'float'.

    If we are saying that 'float' should not be specified in the XSD definition for any fields and should always be Number(Decimal), Appian should not allow this to upload in the system, however since it does, then why its some random values which are giving this strange behavior and not all values.
Children
No Data