5471
Views
7
Comments
How to format Input type currency with comma and decimal place 2
Question

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

2024-02-27 12-57-22
Sam Rijkers

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

2017-02-23 11-12-25
Eric Halim

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

2022-08-24 11-43-47
Ojaswi Borade

Hi @Eric Halim! What's a custom mask component, if you could please elaborate

2023-07-07 09-12-38
Diogo Olival

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

2024-06-19 07-19-32
JitendraYadav

Hi,

Please use mask input for mentioned requirement.


Thanks!

UserImage.jpg
FrankCLT

To expand on this question..what if 123456 to $1234.56


Thank you,

FrankCLT

2021-07-14 09-27-33
Luís Cardoso

Hello FrankCLT,

You can use the built-in action FormatCurrency to do that. Please see the documentation here.

Note: I think you should create a new post because your question is different from the original post in 2018.

BR,

Luis


FrankCLT wrote:

To expand on this question..what if 123456 to $1234.56


Thank you,

FrankCLT



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