I have an input field where i can put either integer or decimal. somehow, i need this input field when im inputting an integer or decimal can be automatic put .00 at the end. Is there a way i can reach that function? Thank you
Hi Jesus,
Check out this Forge component, if you do not want want to use custom JS code, you can use this.
Thanks,
Sujay
how to use it?
If you are using traditional web you can click on the link and install the component, if its reactive you can install from this Link.
Once the component is installed in your environment, add dependecies of Custom Input Masks component using manage dependecies and add the UI flows.
You can then just drag and drop Number mask and configure the properties.
as @sujay kamath suggested you can use this as well. i am attaching an OML with that forge. but when you use this Forge. you can not make it empty it will be remain as 0.00 always. so you can either try this approach or which i have given before.
Hi Jesus Carlos,
use this function for it.
check sample here Sample
hope this helps
Thanks
Prince
That's the function what im looking for but can i put it in my actual input field?
yes you can do it. you have to keep the variable as text only. then you can do it. in variable type decimal you can not fix it. i am attaching an OML as well go through it. and check the sample again. please mark as solution my reply if you find it appropriate.
Sample
the 0.00 shows but when i'm typing it automatically stays only at 0.00 when im erasing it it just stays at 0.00
@Jesus Carlos for this you have to keep it on change event like this. if you keep this on keypress or keyup events. it wont let it empty. so set the event as on change. and check the sample again
sample
is it possible even there is no button like automatic to .00?
see this post same as yours
https://www.outsystems.com/forums/discussion/68027/decimal-value/
already tried it but the problem says "'Currency' data type required instead of 'Text'. "
It works! Thank you both of you!