[Input Mask React] Numeric input mask is working, but the entered value is not sent to outsystems
inputmask-react
Reactive icon
Forge component by João Barata
Application Type
Reactive

Hello,

When I use the "MaskNumber" in our application the input mask works on the input field, but the input value is not sent to Outsystems. The example in the demo application works well. I've recreated everything exactly like in the demo application, but it doesn't work in my application. Does anyone know what I might be doing wrong or where I can look for an solution?

Kind regards,

Furkan

Hi All,

I have found an general solution for this problem see; https://www.outsystems.com/forums/discussion/74351/mask-is-working-but-the-value-is-not-submitted-to-the-server/#Post305082 

I have also tried this with this component and it works for me.

Kind regards,

Furkan

Hi Furkan,

I think this happens when the data type of the variable (that you bind to the input) is Integer. It works fine when it is Text.

I guess it kinda makes sense, because when you bind an integer variable, it automatically selects Number as Input Type, and your input is already masked then. But still seems like a bug on the component-side.

Regards

Hi @Furkan Çetin are you using the latest version of the component?

Also, could you please let me know what was the variable type as well as the options used in the web block?

Hello João,

I have downloaded the latest version from the forge. I have added an input paramater by myself which is called "AllowMinus". Maybe it is an idea for you to add this to the component too (this is a suggestion).

 The input field has input type "Number" and the variable which is binded to the input field is a decimal. The input mask is used with almost the same settings as "InputNumberUS" from the demo application. I have also used the "AllowMinus" option (on True and False) in the demo application and that works well. 



Options in the webblock;

  • DecimalDigits: 2
  • DecimalSeparator: ','
  • GroupSeparator: '.'
  • AlwaysShowDecimalDigits: False
  • UseNumericInput: False
  • AllowMinus: False

Hello João, 

Do you have any suggestion for a solution?

Kind Regards,

Furkan


I have the same problem than Furkan, but it is weird because the component works almost always, however in few times the value sent is 0. I couldn't find in what moment the component doesn't work, it seems random but I believe there is a logic explaining. I attached an example, (0 is the value of the variable of the input)

I am waiting your answer Joao, like Furkan, meanwhile I am going to try to work with text and convert to decimal, if it work I'll notice you Furkan.

Kind Regards

Ok, Finally I belive I have found when the component doesn't work. It is only when you open  the application on the browser for the first time, and if you refresh the browser the problem dissapear. I think it is because of the update of the Service Center, I have updated to Version 11.13.0 and the  problem has started.

I hope this comment help you, Joao, to anaylize the error and fix it quicklier

Hello Guillermo,

After refreshing the browser, the problem still occurs in our situation. We also recently had a platform upgrade if that will help you @João Barata 


I have added an attachment with a solution of the inputmask module and the sample module. In the sample you can see that the eu format of the number is not working with decimals. The integers are now working on our environment, but the EU format decimals are not.

I have edited the autoUnmask parameter to false and used the SourceCode -> InputMaskAuxFunctions in the webblocks instead of the minified versions. That is the only difference

inputmask_v[Running_18_October_2021_07_32_34].osp

Same problem. It's hard to explain, in some browsers happends, in others no... When I open the page directly (first page) works, but when the page that has the number is accesing browsing from another don't works for me.

And the mask that Furkan tells, don't works for me for EU input decimal format, that has "." for thousand separator, and "," for radix. I have test it in demo that provide this component and don't works fine for me :-\

I think this happens when the data type of the variable  

I have updated to Version 11.13.0  

Hi All,

I have found an general solution for this problem see; https://www.outsystems.com/forums/discussion/74351/mask-is-working-but-the-value-is-not-submitted-to-the-server/#Post305082 

I have also tried this with this component and it works for me.

Kind regards,

Furkan

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