<?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>Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/discussions/f/user-interface/39698/currency-input-field-rounding-issues-with-decimal-values-above-10-000-ex-200-300-57---need-plugin-recommendation</link><description>I&amp;#39;m working on a custom currency input field component and facing a challenging issue with decimal value conversion and rounding when values exceed 10,000 (5+ digits). 
 Here&amp;#39;s my current implementation: 
 
 
 Supporting Rule (process_BRLInputSanitizer</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151477?ContentTypeID=1</link><pubDate>Thu, 11 Sep 2025 17:53:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3dcc9033-c74b-4c1f-987a-571851908d50</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="293911" url="~/discussions/f/user-interface/39698/currency-input-field-rounding-issues-with-decimal-values-above-10-000-ex-200-300-57---need-plugin-recommendation/151474"]Appian is not understanding user typed commas as decimal[/quote]
&lt;p&gt;If push comes to shove, I would suggest perhaps using a TEXT field for the input of the numerical value, and cleaning the user input upon SaveInto (converting it to proper decimal type at that point) - this would depend on the user using YOUR numbering system, but would NOT depend on user locale (for what it&amp;#39;s worth).&lt;/p&gt;
&lt;p&gt;Looks like that&amp;#39;s about what you&amp;#39;ve done with your Currency Sanitizer rule.&amp;nbsp; I would suggest you check out the &amp;quot;cleanwith()&amp;quot; function, it takes a little bit of the work out of &amp;quot;substitute&amp;quot; when you&amp;#39;re substituting something for &amp;quot;blank&amp;quot;.&lt;/p&gt;
&lt;p&gt;Anyway thanks for confirming - will appreciate a &amp;quot;verify answer&amp;quot; on any that you feel like giving me props on.&amp;nbsp; Gotta claw my way back into the Top 3 somehow, I still haven&amp;#39;t made up for taking a week of vacation last month &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f605.svg" title="Sweat smile"&gt;&amp;#x1f605;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151475?ContentTypeID=1</link><pubDate>Thu, 11 Sep 2025 14:55:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3e3bf66-fee4-4e71-8510-0dcc08b7c49e</guid><dc:creator>Silas. B. Ferreira</dc:creator><description>&lt;p&gt;Well, I was able to create a workaround and I will share with you all&lt;/p&gt;
&lt;p&gt;rule!_RFind:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!reversed: joinarray(char(reverse(code(ri!string))), &amp;quot;&amp;quot;),
  local!findIndex: find(ri!substring, local!reversed),
  find(
    right(ri!string, local!findIndex),
    ri!string
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;rule!_CurrencySanitizer:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!findComma: rule!_Process_RFind(string: ri!value, substring: &amp;quot;,&amp;quot;),
  local!findDot: rule!_Process_RFind(string: ri!value, substring: &amp;quot;.&amp;quot;),
  if(
    local!findDot &amp;lt; local!findComma,
    todecimal(
      substitute(
        substitute(trim(ri!value), &amp;quot;.&amp;quot;, &amp;quot;&amp;quot;),
        &amp;quot;,&amp;quot;,
        &amp;quot;.&amp;quot;
      )
    ),
    ri!value
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;rule!MoneyField (BRL):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!textField(
  label: ri!label,
  labelPosition: a!defaultValue(ri!labelPosition, &amp;quot;ABOVE&amp;quot;),
  value: a!currency(
    isoCode: &amp;quot;BRL&amp;quot;,
    value: ri!value,
    decimalPlaces: 2
  ),
  placeholder: ri!placeholder,
  saveInto: {
    a!save(
      ri!value,
      rule!_CurrencySanitizer(save!value)
    )
  },
  disabled: a!defaultValue(ri!disabled, false),
  readOnly: a!defaultValue(ri!readOnly, false),
  refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
  validations: { ri!validations },
  showWhen: a!defaultValue(ri!showWhen, true),
  instructions: ri!instructions,
  helpTooltip: ri!helpTooltip
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Special thanks to&amp;nbsp;&lt;a href="/members/mikes0011"&gt;Mike Schmitt&lt;/a&gt;&amp;nbsp;. If any of you have any other suggestion, please don&amp;#39;t hesitate&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151474?ContentTypeID=1</link><pubDate>Thu, 11 Sep 2025 14:31:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:34b98b52-2eaf-498f-a52b-893a1b9d67af</guid><dc:creator>Silas. B. Ferreira</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="/members/mikes0011"&gt;Mike Schmitt&lt;/a&gt;&amp;nbsp; I really appreciate your help.&lt;/p&gt;
&lt;p&gt;There is still only one more point I have to deal, which is: Appian is not understanding user typed commas as decimal. Even though the LOCALE of the user I am testing substitutes dots for commas and vice-versa&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/2620.test.png" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  a!textField(
    label: ri!label,
    labelPosition: a!defaultValue(ri!labelPosition, &amp;quot;ABOVE&amp;quot;),
    value: a!currency(
      isoCode: &amp;quot;BRL&amp;quot;,
      value: ri!value,
      decimalPlaces: 2 
    ),
    placeholder: ri!placeholder,
    saveInto: {
      ri!value,
      ri!saveInto 
    },
    disabled: a!defaultValue(ri!disabled, false),
    readOnly: a!defaultValue(ri!readOnly, false),
    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
    validations: { ri!validations },
    showWhen: a!defaultValue(ri!showWhen, true),
    instructions: ri!instructions,
    helpTooltip: ri!helpTooltip
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So, the issue I am still facing is to make Appian recognize dots as commas and vice-versa.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151473?ContentTypeID=1</link><pubDate>Thu, 11 Sep 2025 14:07:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4c25bc7b-a35e-4206-92f6-e8f7b2f6c2d1</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="293911" url="~/discussions/f/user-interface/39698/currency-input-field-rounding-issues-with-decimal-values-above-10-000-ex-200-300-57---need-plugin-recommendation/151472"]What if, my record type value is a Decimal? How am I going to handle it if the value is always being casted[/quote]
&lt;p&gt;You&amp;#39;re overcomplicating this.&amp;nbsp; Store the decimal value only, and only worry about formatting it anytime it&amp;#39;s output to a user-facing display.&amp;nbsp; That should be it.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote userid="293911" url="~/discussions/f/user-interface/39698/currency-input-field-rounding-issues-with-decimal-values-above-10-000-ex-200-300-57---need-plugin-recommendation/151472"]Appian will always displays the &lt;span&gt;imprecise&amp;nbsp;&lt;/span&gt;value. There is no other way without using a string.[/quote]
&lt;p&gt;The correct decimal value is stored correctly in a decimal type variable, whether that&amp;#39;s a record field or CDT field.&amp;nbsp; Remember that what&amp;#39;s &amp;quot;displayed&amp;quot; is liable to be different from what&amp;#39;s there in the underlying data, when just looking at the default output.&amp;nbsp; Casting the output to text and using the formatting string merely forces the&amp;nbsp;&lt;em&gt;&lt;strong&gt;displayed value&lt;/strong&gt;&lt;/em&gt; to look like what you&amp;#39;re expecting (but of course this is still a representation of the underlying data).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151472?ContentTypeID=1</link><pubDate>Thu, 11 Sep 2025 13:47:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a6215620-6c7c-4d64-a048-5510b1cedb7a</guid><dc:creator>Silas. B. Ferreira</dc:creator><description>&lt;p&gt;What if, my record type value is a Decimal? How am I going to handle it if the value is always being casted and not showing precisely on the input?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/2804.test.png" /&gt;&lt;/p&gt;
&lt;p&gt;I would like to show the value not casted, on the input, so, there is no way without using a Text value. But what if my record.field is a Decimal? Appian will always displays the &lt;span&gt;imprecise&amp;nbsp;&lt;/span&gt;value. There is no other way without using a string. Is there?&lt;/p&gt;
&lt;p&gt;Ex.: If I pass a decimal as a rule input, it&amp;#39;s over, it will display the imprecise value again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151442?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2025 19:10:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d9ab0aec-5030-4e82-ad67-e48325c3935d</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="293911" url="~/discussions/f/user-interface/39698/currency-input-field-rounding-issues-with-decimal-values-above-10-000-ex-200-300-57---need-plugin-recommendation/151441"]However, I am wondering as well if Appian is gonna pass the real value when it&amp;#39;s expected to be a decimal[/quote]
&lt;p&gt;The &amp;quot;real value&amp;quot; is what&amp;#39;s being stored in Appian, which is what I&amp;#39;m trying to show you.&amp;nbsp; The rounded value you&amp;#39;re seeing in the local variables panel is merely a &amp;quot;user facing&amp;quot; output, not the internal value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151441?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2025 19:06:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d2a4d572-198c-4043-9910-dfd4687b56f1</guid><dc:creator>Silas. B. Ferreira</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!amount,
  local!amountDecimal,
  a!textField(
    label: &amp;quot;Amount in Text&amp;quot;,
    /* Instructions  show the saved datatype*/
    instructions: &amp;quot;Type of local!amount: &amp;quot; &amp;amp; typename(typeof(local!amount)),
    value: a!currency(
      isoCode: &amp;quot;BRL&amp;quot;,
      value: local!amount,
      format: &amp;quot;SYMBOL&amp;quot;
    ),
    /* Instead of saving the value as text, a!save() is used to store to the desired datatype*/
    saveInto: {
      a!save(
        local!amountDecimal,
        text(todecimal(save!value), &amp;quot;#.##&amp;quot;)
      ),
      a!save(local!amount, save!value)
    }
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Right, this method text() casts the value to text.&lt;/p&gt;
&lt;p&gt;However, I am wondering as well if, whenever it casts, Appian is gonna pass the real value when it&amp;#39;s expected to be a decimal, or, it is simply going to round, and miss the decimals digits.&lt;/p&gt;
&lt;p&gt;For example: a recordType&amp;#39;s field is a Decimal, so, when appian automatically converts the value to the decimal field in my grid `fv!item.field` (which expects a decimal but receives a casted value), is it gonna simply round or is it going to preserve the original value as sholud be (ex.: 400300.37 instead of 400300.4)?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/5287.test.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151440?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2025 18:59:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b352ad2e-02a2-448e-8384-1bbcb1a1839f</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;So basically my prior answer is correct:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/pastedimage1757530754213v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151439?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2025 18:56:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3dc778f5-d741-41e3-baa6-86c9026ba62e</guid><dc:creator>Silas. B. Ferreira</dc:creator><description>&lt;p&gt;I was just about to provide it&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/1258.test.png" /&gt;&lt;/p&gt;
&lt;p&gt;I will try what you suggested in just a sec&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151438?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2025 18:54:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d50f1fe6-c568-4d6d-abe7-3f8e613d60b8</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Could you provide a screenshot of an example of the output you&amp;#39;re seeing and the actual underlying value that you&amp;#39;d expect to be seeing?&lt;/p&gt;
&lt;p&gt;Have you tried formatting the output through functions like &amp;#39;text(value, &amp;quot;0.00&amp;quot;)&amp;#39; to signify that you want the&amp;nbsp;&lt;em&gt;&lt;strong&gt;displayed output&lt;/strong&gt;&lt;/em&gt; to show the entire number including 2 decimal places at all times?&amp;nbsp; Because as I said, when just displaying decimal data, Appian (badly) guesses at what level of significant digits should be displayed to the user.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151437?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2025 18:51:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a47d58a7-9193-4c41-9c13-224ad9f7b73b</guid><dc:creator>Silas. B. Ferreira</dc:creator><description>&lt;p&gt;&lt;span&gt;Yes, the currency formatter is meant to handle it, but it&amp;#39;s automatically rounding the value when I convert it back to decimal, even though I don&amp;#39;t want it to.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Currency Input Field Rounding Issues with Decimal Values Above 10,000 (Ex.: 200,300.57) - Need Plugin Recommendation</title><link>https://community.appian.com/thread/151434?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2025 14:22:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:732b20ea-152b-4ef7-b749-8115b70058b7</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Appian&amp;#39;s default way of displaying decimal numbers takes some sometimes unintuitive liberties with the number of significant figures shown - in ways that are a little unintuitive and opaque to not only the end user but also the designer (frustratingly).&amp;nbsp; I&amp;#39;m not exactly sure I&amp;#39;m comprehending the manual conversions you&amp;#39;re with your utuility rule, but I was under the impression that &lt;em&gt;a!currency()&lt;/em&gt; was supposed to handle things like &amp;quot;dots instead of commas and commas instead of dots&amp;quot; automatically for currencies that use opposing systems (though i haven&amp;#39;t tested this).&amp;nbsp; BTW, are users not using locales that support the proper number entry system inherently?&amp;nbsp; I thought it worked without manual conversion when the locale was set right (also haven&amp;#39;t personally tested though).&lt;/p&gt;
&lt;p&gt;My general advice at this point would be to go back to basics and make sure you&amp;#39;re doing any manual conversion on a displayed number (versus the underlying decimal value)&amp;nbsp;&lt;strong&gt;&lt;em&gt;only at the very end&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;, to avoid it becoming confused.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>