null value decimal

null value decimal


Hello all,

For an application with lots of calculations I have a problem with the null values of decimals. When an input (Number) field is empty, i don't need the calculations to be run. But, OutSystems converts empty Decimals into 0. But, the number 0 should be a legit value. 

How to overcome this "bug" in OutSystems?

Hi Martin,

Is there any value that is invalid?... you can use the Null Value attribute of an input to specify what should the empty input value be.  

You can use the TypedValue runtime property of the input and check whether it's empty.

There are no invalid values. And I forgot to tell you, but it is a mobile application. The Typed Value Praperty isn't implemented there.

Ok, so there's always the possibility to bind the input to a Text variable. In that case, you will need to perform validation yourself.

Another possibility is to fetch the input value in a Javascript block. Create a Javascript block with InputWidgetId as input, and TypedValue as output. Then write something like:

$parameters.TypedValue = document.getElementById($parameters.InputWidgetId).value;