Decimal (18,9) value in SQL from Appian

Hello,

Client wants to have Decimal(18,9) in SQL db as this DB is being used by others as well. But when we try to insert it using Appian either it converts to exponential or gives error as CDT field we have created decimal type.

If I am doing todecimal then also it gives error.

Please let me know what shud we do so that atleast 18 digits we can save , I know Appian dosnt support 9 percision after decimal so it would be hard but if someone could suggest workaround so that we can save in DB decinal (18,9).

Not all the values are comming from Appian interface , few values we are fething from third party system also.

Thanks,

Pooja

  Discussion posts and replies are publicly visible

  • You can keep the CDT field type in Appian as string and map it to a DECIMAL (18, 9) column in the back end database. For instance the xsd element in your cdt can be as follows -

    <xsd:element name="decValue" nillable="true" type="xsd:string">
        <xsd:annotation>
            <xsd:appinfo source="appian.jpa">@Column(name="decValue", columnDefinition="DECIMAL")</xsd:appinfo>
        </xsd:annotation>
    </xsd:element>

    On the Appian interface, use a text field to capture this value from user but make sure it is validated for decimal (18, 9) or else database write will fail.

  • Thanks for the suggestion but it is giving error

    An error occurred while trying to write to the entity "CO_TEST_BASE1123" [id=49b9c55e-18cf-4f44-b9e3-ad62fb06f852@1514, type=CO_TEST_BASERATE (id=8968)] (data store: LOAN_BUSINESSDATASTORE). Details: org.hibernate.exception.SQLGrammarException: could not load an entity: [COTESTBASERATEDT7997#1.234568e+18]: com.microsoft.sqlserver.jdbc.SQLServerException: Error converting data type nvarchar to numeric. Data: TypedValue[it=8968,v={1.234568e+18}]