<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Decimal Precision</title><link>https://community.appian.com/discussions/f/data/19127/decimal-precision</link><description>Hi Guys, 
 I have several decimal fields in one database with a precision of 15 and a scale of 3 (DECIMAL (15,3)). 
 On my interface if I put a decimal with more than 12 precision digits the node Write to Data Store Entity is always failing. I already</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Decimal Precision</title><link>https://community.appian.com/thread/106950?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2023 19:09:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c59ff0c1-623d-4b5e-a476-c4abcbd0cfb4</guid><dc:creator>Doga Barsgan</dc:creator><description>&lt;p&gt;I think what you are trying to achieve is to be able to store 15 digits before the decimal point and 3 digits after the decimal point. If that&amp;#39;s the case, you will need to change the data type of the column to DECIMAL(18,3) in the database. DECIMAL(15,3) cannot store a value that is bigger than 999,999,999,999.999&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decimal Precision</title><link>https://community.appian.com/thread/74988?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 19:39:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:89eb1aab-08c8-4a0d-af07-5aa51a87aff1</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;Per your description it&amp;#39;s because the number is too large to be represented as a Decimal.&lt;/p&gt;
&lt;p&gt;I also think you may misunderstand how the DECIMAL() type of the MySQL / ORACLE works.&amp;nbsp; I thought you had 3 digits before decimal, and 15 total.&amp;nbsp; 17 total is more than a Decimal can hold.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decimal Precision</title><link>https://community.appian.com/thread/74977?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 16:14:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:297a9837-b4ff-408d-9277-b6aaccac9bbf</guid><dc:creator>martincamacho</dc:creator><description>&lt;p&gt;have you tried spliting the value in several cdt fields?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decimal Precision</title><link>https://community.appian.com/thread/74976?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 16:09:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:763ae4b8-2162-4b71-9bc2-66229a69a563</guid><dc:creator>martincamacho</dc:creator><description>&lt;p&gt;double tpye has 15 digits of precision that includes all digits before and after the point. plase take a look&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/20.2/Appian_Data_Types.html#number-decimal"&gt;https://docs.appian.com/suite/help/20.2/Appian_Data_Types.html#number-decimal&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For PVs, if you enter a number that exceeds the maximum number of digits supported by double precision floating-points, the number is truncated down to the maximum number of digits when you save the process model. It does not provide you with a warning message if this occurs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decimal Precision</title><link>https://community.appian.com/thread/74974?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 15:44:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a63fba80-3ec9-49e6-9eb6-3ad3ce8b5917</guid><dc:creator>fredericom</dc:creator><description>&lt;p&gt;Hello. Thank you for your reply. I think you misunderstood my question.&lt;/p&gt;
&lt;p&gt;In general I have the following:&lt;/p&gt;
&lt;p&gt;- a textField when I want to put a value like this: 123123123123123.23 (15 digits before the decimal point). After this, I cast the value to a decimal value in order to save this value into a CDT with a decimal field.&lt;/p&gt;
&lt;p&gt;- However, this is only working for numbers up to 12 digits before the decimal point. If I consider 15 digits (like the previous number) the&amp;nbsp;&lt;span&gt;Write to Data Store Entity will always fail.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- With this number &amp;quot;123123123123.24&amp;quot; the process works because I have a decimal number with 12 digits, however if I put &amp;quot;123123123123123.23&amp;quot; the process will fail because right now I have 15 digits (before the decimal point).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you have any idea why this is happening ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decimal Precision</title><link>https://community.appian.com/thread/74971?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 13:25:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a4e1f768-b721-4087-ab51-b8dde094d744</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;You could possibly use the fixed function to get exactly 12 decimal places after a number, but the output will be a Text, and your XSD will have to cast the text directly into the DECIMAL type without going through Appian types.&amp;nbsp;&amp;nbsp;15 significant digits is about the absolute limit of the Decimal type Appian uses, but also for reasons they always convert especially precise figures into scientific notation.&amp;nbsp; You have to use the fixed() function to get rid of the scientific notation.&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t work, you&amp;#39;ll need to build a custom Math plugin in Java or see if one is available from the AppMarket.&amp;nbsp; The Java will have to write to your DB if fixed() doesn&amp;#39;t cut it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>