[Input Mask Reactive] Mask is working but the value is not submitted to the server
input-mask-reactive
Reactive icon
Forge component by Steven Decock
Application Type
Reactive

Hello,

I am using the InputNumberMask widget  in our application with the following input parameters;

  • Scale : 2
  • Signed : false
  • ThousandsSeparator : ""
  • PadFractionalZeros : false
  • NormalizeZeros : false
  • Radix : ","
  • MapToRadixJsonArray : "["".""]"

and the Input Type of the input field is 'Text'. The data type of the parameter is Decimal. 

The Mask is working on the input field but the value is not submitted to the server after typing an '.' or ','. An integer is sent to the server, but an decimal is not. 

Does anyone know how to fix this problem?

Kind regards,

Furkan 


May I suggest and I don't know if you can do it this way but changing the local var to Text and in the expression you can use:
 

FormatDecimal(TextToDecimal(Replace(Decimal3, ",", ".")), 2, ",", ".")

The FormatDecimal is to display to the user with the comma again, the TextToDecimal can be used to send the value to the server or you can do it server side. It seams having the comma is the problem.

Hi Furkan,

Assuming you are using TextToDecimal before sending the decimal number to the server, this function only accepts the "." as a decimal separator. So perhaps replace the "," for a ".", do the conversion and then send it to the server.

Hope it helps.

Rúben

Hi Rúben,

Thank you for your response. I am not using the TextToDecimal before sending the values to the server.

Kind regards,

Furkan

OK, could you provide a sample with the problem?


Oke, when I want to attach a .oml or .oap file I see the following error message;

So I have attached it as a zip file

inputmask_v[Running_08_November_2021_13_41_55].osp

May I suggest and I don't know if you can do it this way but changing the local var to Text and in the expression you can use:
 

FormatDecimal(TextToDecimal(Replace(Decimal3, ",", ".")), 2, ",", ".")

The FormatDecimal is to display to the user with the comma again, the TextToDecimal can be used to send the value to the server or you can do it server side. It seams having the comma is the problem.

Thank you for your suggestion Rúben. This might be a solution for someone who doesn't use a lot of variables, but I have too many variables to use this.

Hi Rúben,

I did it this way anyway and that works now for us. It was a lot of work, but it works now.

Thank you very much

Hey Furkan,

I can imagine the work, but glad it helped.

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