<?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>Hi, We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/discussions/f/rules/6625/hi-we-are-trying-to-retrieve-float-values-from-database-but-the-value-retu</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hi, We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/49702?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2017 14:51:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:21e2dfd6-74a1-4aa4-ac6a-248a037b8649</guid><dc:creator>chandu</dc:creator><description>Worth a try, can you re import your xsd changing type=&amp;quot;xsd:decimal&amp;quot; for INVOICE_AMOUNT_EX_GST and test.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi, We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/49691?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2017 02:54:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c38140f2-4870-4d3d-af6a-1cc294783d41</guid><dc:creator>manikandanp13</dc:creator><description>@Nikhil, It seems you define and test INVOICE_AMOUNT_EX_GST same as element GST_AMOUNT without column Definition annotation&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi, We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/49688?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2017 21:42:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2fbebcb0-edb8-4439-84c5-a34516e3e1f2</guid><dc:creator>rameshk</dc:creator><description>Nikhil- Did you find any solution to make the data consistent between the database data and the queried data in Appian ?&lt;br /&gt;
We have the same issue that few values are rounding of to 1 decimal digit. We even tried using decimal(x,y) in JP annotations but no luck.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/26167?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2016 02:28:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:958ef91e-2b50-43e7-94e2-6c3d930d4072</guid><dc:creator>nikhilh0001</dc:creator><description>Thanks for your replies guys, unfortunately, we cannot change the table column data type at this point.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/26108?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2016 11:03:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3bb16d11-883f-4100-907e-1be3ed85447a</guid><dc:creator>Rahul Gundu</dc:creator><description>In database we are using datatype NUMBER. &lt;a href="https://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#i22289"&gt;docs.oracle.com/.../datatype.htm&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/26099?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2016 09:56:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:373b27ae-01ef-42a5-a1b2-aca6b8e926f7</guid><dc:creator>KARTHIK NATARAJAN</dc:creator><description>@Nikhil, Can you try changing the table column and corresponding CDT column type to Number(x,y) ? It is working fine for us!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/26094?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2016 03:00:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bc2ba361-bd21-418f-a8b3-1c6261483256</guid><dc:creator>nikhilh0001</dc:creator><description>@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.&lt;br /&gt;@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)&lt;br /&gt;&lt;br /&gt;The datatype for all 3 columns in the database is FLOAT. &lt;br /&gt;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.&lt;br /&gt;Why is Appian treating the 3 elements differently?&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/26041?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 10:51:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d4b72a27-f42e-4e8a-98b5-e034320b6d11</guid><dc:creator>Rahul Gundu</dc:creator><description>In one of our XSD, we used below format. This gives exact value that exist in the database. And we are using oracle 10g. Hope it&amp;#39;ll help you.&lt;br /&gt;      &amp;lt;xsd:element name=&amp;quot;LATITUDE&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:double&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;xsd:annotation&amp;gt;&lt;br /&gt;          &amp;lt;xsd:appinfo source=&amp;quot;appian.jpa&amp;quot;&amp;gt;@Column(name=&amp;quot;LATITUDE&amp;quot;, columnDefinition=&amp;quot;NUMBER NULL&amp;quot;)&amp;lt;/xsd:appinfo&amp;gt;&lt;br /&gt;        &amp;lt;/xsd:annotation&amp;gt;&lt;br /&gt;      &amp;lt;/xsd:element&amp;gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/26040?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 10:47:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e346798d-7e19-439f-a403-c41926a6b259</guid><dc:creator>shivakanthr</dc:creator><description>Can you try with round function&lt;br /&gt;Ex: round(7.1254, 3) returns 7.125&lt;br /&gt;       round(7.1254, 2) returns 7.12&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/26037?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 09:35:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:00d3835f-9298-4f39-bbf3-ffb0e2b572bc</guid><dc:creator>sonalk</dc:creator><description>I tried with the value in the live view &lt;br /&gt;fixed(  todecimal(154037.37),  2) output is  - 154,037.37&lt;br /&gt;Please note it will round up in cases as specified below &lt;br /&gt;fixed(  todecimal(    154037.309  ),  2) output - 154,037.31&lt;br /&gt;Let&amp;#39;s see if any other practitioner can share some valuable inputs on this.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/26035?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 09:18:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e95db4b5-d955-4416-804b-d67c00b564f6</guid><dc:creator>nikhilh0001</dc:creator><description>Hi Sonal, thanks for the reply, &lt;br /&gt;1. We are using Oracle 10g&lt;br /&gt;2. In my example, using fixed(todecimal(ruleinput)) shows the correct output, however, now there is a mismatch between what is shown in Live view vs what is shown in the Data view in the Interface designer (See attachment)&lt;br /&gt;Also, any idea why is this happening intermittently? ...for the 3rd attribute (GST_AMOUNT) it is showing correctly.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/15/SAILInterface.png"&gt;&lt;img src="/cfs-filesystemfile/__key/communityserver-discussions-components-files/15/SAILInterface.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi,&lt;br /&gt;We are trying to retrieve float values from database but the value retu</title><link>https://community.appian.com/thread/26034?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 08:28:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b463d494-5114-49a1-a419-cc8db62ffa9c</guid><dc:creator>sonalk</dc:creator><description>Hi Nikhil,&lt;br /&gt;Which database are you using ? &lt;br /&gt;If its MySQL try updating the XSD as mentioned below :&lt;br /&gt; &amp;lt;xsd:element name=&amp;quot;amount&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:decimal&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;xsd:annotation&amp;gt;&lt;br /&gt;          &amp;lt;xsd:appinfo source=&amp;quot;appian.jpa&amp;quot;&amp;gt;@Column(name=&amp;quot;Amount&amp;quot;, columnDefinition=&amp;quot;Decimal(10,2)&amp;quot;)&amp;lt;/xsd:appinfo&amp;gt;&lt;br /&gt;        &amp;lt;/xsd:annotation&amp;gt;&lt;br /&gt;      &amp;lt;/xsd:element&amp;gt;&lt;br /&gt;Configure the column data type as &amp;quot;Decimal&amp;quot; and length as (10,2) in database as well.&lt;br /&gt;This link provides the maximum precision in Appian :&lt;br /&gt;&lt;a href="https://forum.appian.com/suite/help/7.11/Custom_Data_Types_from_XSD.html"&gt;forum.appian.com/.../Custom_Data_Types_from_XSD.html&lt;/a&gt;&lt;br /&gt;Else you could use fixed function at the output of the query entity &lt;br /&gt;Example :  fixed(  todecimal(100.540), 2) output is - 100.54&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>