I'm building a reactive calculator application, the user should be able to enter the bill in the input widget and bill should be formatted accordingly. For example, if the bill is $100, it should be $100.00, including the dollar sign.
The input type, variable assigned to the input widget is integer.
I would highly appreciate anyone's help. Thank you
Hi Rob Rakhmatullaev ,
you can use this Built-In-Function for achive this ,
FormatCurrency(IntegerValue, "$" , 2 , "." , ",")
where IntegerValue is your integer variable
Demo Link
Hello Kundan,
I have tried that, but it doesn't work on the input widget. The widget should be formatted as user enters the bill
Please check Demo link :Demo Link
Hi Rob,
Probably for your use case you can use the input mask forge asset: inputmask-react
I observed your example bill value also contains decimal digits, then I would suggest you consider the variable data type as Decimal rather than an integer data type.
Demo Screen: InputMaskTask
Refer to the attached oml.
I hope this helps you!
Kind regards,
Benjith Sam
Hello
I have created a Scenario via JavaScript that may help you to achieve this
have a look at it, I am attachin Oml
https://personal-wwkmlamd.outsystemscloud.com/SamplePractice/Currency?_ts=637956012278052797
I hope this helps
Thanks
Tousif khan