How to format Input type currency with comma and decimal place 2

How to format Input type currency with comma and decimal place 2

  

I want to format the currency value in terms of comma & decimal in expression.


ex: 1234.556 will be 1,234.56

Thanks in Advance

Hey assif_tiger,

You can use the build-in FormatCurrency() function for that.

Documentation: https://success.outsystems.com/Documentation/10/Reference/Logic/Built-in_Functions/Format_Built-in_Functions#FormatCurrency


Regards,

Sam

Yes it is easy for expression you can do as Sam said above...but for input form it would be trickier....Just share my experience on this....

You can use help 1 extra variable and use of custom mask component.

Bind custom mask to this 1 variable and make this variable as variable for input widget.

Then don't forget to convert to necessary format when you do save action

Hello,


On an expression, you can use the system function 'FormatDecimal' where you can set the number of decimal places, the thousands separator character, and the decimal separator character. 

FormatDecimal(TextToDecimal("1234.556"),2,".",",")


On Inputs, for web applications, you can use the forge component Custom Masks and for mobile applications, you can use forge component Input Masks Mobile.


Hope it helps.


Regards,

DO

Hi,

Please use mask input for mentioned requirement.


Thanks!