<?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>Appian Converting the decimal value to a nearest integer</title><link>https://community.appian.com/discussions/f/integrations/17209/appian-converting-the-decimal-value-to-a-nearest-integer</link><description>HI All, 
 
 I&amp;#39;m using Appian Integrations to call one of the API&amp;#39;s. I have set the response Body parsing to &amp;quot;Convert JSON To Appian Value&amp;quot; instead of the default &amp;quot;Return raw response body&amp;quot;. 
 So when I tried to call an API with the above set configuration</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Appian Converting the decimal value to a nearest integer</title><link>https://community.appian.com/thread/116808?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2023 09:11:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dec261a2-6cb1-4fca-8688-fafc6db0bdf3</guid><dc:creator>manishk114</dc:creator><description>&lt;p&gt;Faced the same issue today, used the test function to resolve it .&lt;/p&gt;
&lt;p&gt;-&amp;gt; use&amp;nbsp;&lt;span&gt;convert json to appian value in integration.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-&amp;gt;go to the node and then format it with the pattern you want like below.&lt;/p&gt;
&lt;p&gt;-&amp;gt;Use the Text (index(local!body,&amp;quot;node&amp;quot;,&amp;quot;node&amp;quot;,{}),&amp;quot;######.##&amp;quot;)&lt;/p&gt;
&lt;p&gt;this will give you the data which comes in raw&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Appian Converting the decimal value to a nearest integer</title><link>https://community.appian.com/thread/116015?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2023 11:58:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:30ab0478-1694-4245-82f9-eaeea4d3ad30</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;This is just a display &amp;quot;issue&amp;quot;. When turning a number into string for display purposes, Appian rounds aggressively. You can find a gazillion of discussions on that topic here.&lt;/p&gt;
&lt;p&gt;Nothing wrong! Just go on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Appian Converting the decimal value to a nearest integer</title><link>https://community.appian.com/thread/116014?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2023 11:47:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:552165db-4c8f-4ccd-8e9a-f2bc12f6a064</guid><dc:creator>philippem0001</dc:creator><description>&lt;p&gt;Hi, I have the same problem.&lt;/p&gt;
&lt;p&gt;The integration with the api don&amp;#39;t return the right value with &amp;quot;convert json to appian value&amp;quot; ( 162132.8 instead of 162132.79 ).&lt;/p&gt;
&lt;p&gt;I put the image with &amp;quot;converting json to appian value&amp;quot; (162132.8)&amp;nbsp; :&amp;nbsp;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/18/Error_5F00_in_5F00_converting_5F00_json_5F00_to_5F00_Appian_5F00_value.PNG" /&gt;&amp;nbsp;and the image with raw text (162132.79 ):&amp;nbsp;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/18/Raw_5F00_text_5F00_from_5F00_api.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The api returns a number (double) - test with postman :&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;quot;capitalContingency&amp;quot;&lt;/span&gt;&lt;span&gt;:&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;quot;value&amp;quot;&lt;/span&gt;&lt;span&gt;:&amp;nbsp;&lt;/span&gt;&lt;span&gt;162132.79&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;quot;currency&amp;quot;&lt;/span&gt;&lt;span&gt;:&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;quot;EUR&amp;quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Appian Converting the decimal value to a nearest integer</title><link>https://community.appian.com/thread/68056?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2019 15:30:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d0dee8c2-5998-45ad-bdff-36d3d48cd8da</guid><dc:creator>adithyay</dc:creator><description>&lt;p&gt;No, I&amp;#39;m not casting it, it is the output which I see when I call an API which has a json response.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Appian Converting the decimal value to a nearest integer</title><link>https://community.appian.com/thread/67940?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 21:36:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fef241e1-e957-41cf-a4f8-f3cba7c7ebf9</guid><dc:creator>Nathan Hunter</dc:creator><description>&lt;p&gt;That&amp;#39;s odd. Normally the decimal value should stay the same. I have just run a test by using a!fromJson(a!toJson({number:&lt;span&gt;42103.95&lt;/span&gt;})) and it worked fine.&lt;/p&gt;
&lt;p&gt;Are you casting it to a CDT using cast()? If so, if an integer data type has the corresponding keyword it will remove the decimal value to convert it into an integer - for example&amp;nbsp;tointeger(42103.95) returns 42103.95&lt;/p&gt;
&lt;p&gt;If not, could you either copy and paste your SAIL or upload a screenshot?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>