229
Views
3
Comments
Solved
Format Decimals Potential bug?
Question

Hi All,

Anyone else getting this problem, trying to format a decimal but being told it needs a decimal rather than text, but I am using a decimal data type:

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi André,

This is not a bug, fhe FormatDecimal returns the decimal value formatted as Text, just as the message at the bottom of your screen shot explains.

So you can not assign it to a parameter of type Decimal, it should be of data type Text.

Regards,

Daniel

2018-10-04 11-30-51
glenn michiels

A solution would be to wrap your code in a TextToDecimal() function.

Ex. TextToDecimal(FormatDecimal(Decimal,0,",","."))

Regards,
Glenn

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Btw, if you need currency formatting on input fields that this is a very nice component to handle that:

https://www.outsystems.com/forge/component-overview/505/simple-currency-input

Check-out the demo app.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.