81
Views
13
Comments
Solved
Automatic .00 to input fields
Question
Application Type
Reactive
Service Studio Version
11.54.37 (Build 63002)
Platform Version
11.25.0 (Build 41743)

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 

2023-10-18 08-33-42
sujay kamath
Solution

Hi Jesus,

Check out this Forge component, if you do not want want to use custom JS code, you can use this.

Thanks,

Sujay

UserImage.jpg
budang haba

how to use it?

2023-10-18 08-33-42
sujay kamath

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.


Thanks,

Sujay

2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution

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. 

AssignmentDecimal.oml
2024-05-08 06-29-37
Prince Aadil Khan Panwar

Hi Jesus Carlos,

use this function for it.

check sample here Sample

hope this helps

Thanks

Prince


UserImage.jpg
budang haba

That's the function what im looking for but can i put it in my actual input field?

2024-05-08 06-29-37
Prince Aadil Khan Panwar

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

AssignmentDecimal.oml
UserImage.jpg
budang haba

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

2024-05-08 06-29-37
Prince Aadil Khan Panwar

@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


UserImage.jpg
budang haba

is it possible even there is no button like automatic to .00?

UserImage.jpg
budang haba

already tried it but the problem says "'Currency' data type required instead of 'Text'. "

2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution

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. 

AssignmentDecimal.oml
UserImage.jpg
budang haba
2023-10-18 08-33-42
sujay kamath
Solution

Hi Jesus,

Check out this Forge component, if you do not want want to use custom JS code, you can use this.

Thanks,

Sujay

UserImage.jpg
budang haba

how to use it?

2023-10-18 08-33-42
sujay kamath

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.


Thanks,

Sujay

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