76
Views
11
Comments
Solved
inputmaskcurrency

Hi Team, 

Mask currency will not allow us to enter value 0 ( we cannot save / display 0 by using inputmask )

is there any other way we can retain the currency format and enter /save value 0?


please assist , its urgent


Thanks 

2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hi Nandini,

This behavior is not related to InputMask its related to OutSystems input widget (textbox) in case its type is number its not showing default value of number (Zero) but there is two work arounds you can try one of them.

- First one add to your input widget protperty show-default-value = true as following post 

https://www.outsystems.com/forums/discussion/33763/input-widget-doesnt-display-zero-value/ 

- Second one to change type of your input widget to text but I prefer first one.

2020-11-25 10-45-32
Mostafa Othman
Champion

Hello Nandini,

Can you please share more details? Are you using reactive or traditional application? Which forge component you are using for input mask? 

UserImage.jpg
Nandini T S

Thanks for the response Mostafa

I'm using reactive web App

Inputmaskreact is the forgecomponent

Plz assist

2024-01-31 05-29-41
Akshay Deshpande

Hello Nadini, 

As already Mostafa ask so its really give some idea if you explain in details
but for the time, i want to ask

what is the data type of  that input widget where you masking ? if its text then can you try with integer or long integer (because I don't know which component you are using but for some component if you give integer then by default its take zero in currency also )

Thanks and Regards,

Akshay Deshpande

UserImage.jpg
Nandini T S

Hi Akshay ,

Thanks for the response 

I am using reactive App 

the data type of the inputwidget is Number 

forge componet -> inputmaskreact 

I can enter 0 in the input widget , but while saving its vanished 

UserImage.jpg
Nandini T S
Inputmasktest.oml
2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hi Nandini,

This behavior is not related to InputMask its related to OutSystems input widget (textbox) in case its type is number its not showing default value of number (Zero) but there is two work arounds you can try one of them.

- First one add to your input widget protperty show-default-value = true as following post 

https://www.outsystems.com/forums/discussion/33763/input-widget-doesnt-display-zero-value/ 

- Second one to change type of your input widget to text but I prefer first one.

UserImage.jpg
Nandini T S

Great, 

This solves the problems , a tricky one for me ...

Thanks for the solution 

but as the default value is 0 for new record also it shows 0 but need user prompt there "Enter Value"


2020-11-25 10-45-32
Mostafa Othman
Champion

Yes, actually for new records it will show 0 also as this is the default value which I see it is not an issue.

You can do another workaround but will take more effort and time by changing textbox type to text and create local variable of type text then on after fetch action of aggregate you will need to check if BusinessId is null then make local variable empty otherwise take value from aggregate but take care while you are saving record you will need to convert value again from text (local variable) to decimal (database column type)

If my answer helped you please mark it as solution

UserImage.jpg
Nandini T S

Thanks  much , 

it was the show stopper , its resolved now 



2020-02-22 10-02-04
Allan Kedari

Hello Nandini,

You can try below solution for your problem. Hope it works for you.


UserImage.jpg
Vishnupriya S

Hi team even I'm facing the same issue. When I set the variable value to 0.00 it's not reflecting in the screen input field. I tried using show-default-value = true but still the input field value is not changing still remains the previously entered value. I can't change my variable type from decimal to text.

Is there any alternative to achieve this.


Thanks Vishnupriya.

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