27
Views
8
Comments
[Input Mask React] Input Mask React - How to the include 0 in if the decimal is 10ths
inputmask-react
Reactive icon
Forge asset by João Barata
Application Type
Reactive

0 is not showing if the value in decimal in 10ths.

Mask Config:


Please help. thank you!


2024-07-16 17-36-51
Shradha Rawlani

Hi @Juan Miguel Martinez,

Could you please check how these values are stored in the database?

If the database also does not contain the leading zero in the mentioned values, then it appears to be a calculated value. In that case, could you help clarify how the conversion from 9 to 90 is being handled?

Best regards,

Shradha Rawlani

UserImage.jpg
Juan Miguel Martinez

Hello @Shradha Rawlani

Amount stored in DB:




And yes, this is a calculated value and then saved to Database.


Conversion is handled through its computed amount and when i try to get and reflect it. I use input mask currency with this config:


2024-10-12 12-11-20
Kerollos Adel
Champion

Hallo @Juan Miguel Martinez ,

I think it would be better to download the demo and try it — that might help.




2025-08-07 06-30-56
Amit J
Champion

In OutSystems, this behavior happens because Decimal variables do not preserve formatting like leading or trailing zeros — they store only the numeric value, not how it looks.

So when you save 0.10 as a value:

  • Internally, OutSystems treats it as 0.1 (same numeric value, no formatting difference).

  • When displayed in the debugger or passed to a widget without a mask/format, it shows in its shortest form — 0.1.

If you need to always display the trailing zero, you must format it as text when binding to the UI, for example:

  • Using the TextToDecimal + DecimalToText pattern with a format mask

  • Or with the built-in FormatDecimal() function:

FormatDecimal(YourVariable, 2, ".", "")

I hope you got the reason.

2025-08-07 06-30-56
Amit J
Champion

Hi ,
Download the latest forge component and set true for UsernumericInput


https://amitj.outsystemscloud.com/InputMaskReactiveSample/Demo



UserImage.jpg
Juan Miguel Martinez

Hello @Amit Jain 

maybe our version is not updated. This option is not showing in InputNumber.


Should i intall this version instead?


Thank you!

2025-08-07 06-30-56
Amit J
Champion

Yes, Install it.

2025-08-07 06-30-56
Amit J
Champion

Is it working as expected?

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