17
Views
11
Comments
Solved
[Input Mask Reactive] Currency input mask - Reset value to 0
Forge component by Steven Decock
1
Published on 08 May 2020

Hi,

I have one question about this scenario:

 I have an input field that using currency input mask for ', ' separator and decimal place. It works well but there is an issue if i need to reset the value of the input field to 0 after validation check negative number. I want to make it back to 0 after validate the negative number but  the value displayed on input field does not reset and remain the same . The input field use onChange event to trigger validation for negative number.

I hope there is a solution for this.

Thank you




Rank: #292
Solution

Hi Aqil,

I went through your oml and found solution. You just need to set your Currency variable data type to text instead of decimal and it works same as you were using it for decimal variable and also reset variable to 0 if entered number is negative.

I have attached working OML herewith.

and here is the reference link of the demo:

https://shweta-gedam.outsystemscloud.com/InputMaskSample/InputTest?_ts=637442639333746161

Hope it works now, Thanks and Happy Coding!!

InputMaskSample.oml

Hi Aqil,

You have to only assign variable(currency)=0.


Hope this helps.

thanks,

Samiksha

Rank: #292

HI Aqil,

Are you using any prefix like '$' for currency Input and also what is the data type of your input field in Input type properties and variable?