Quirky behavior of number page variables

I configured several page variables as type number to hold the degrees, minutes and seconds of latitude (and longitude). I convert those values to a decimal representation with this formula:

pageVars.vLatDeg + (pageVars.vLatMin/60) + (pageVars.vLatSec/3600)

When a positive value is entered into an input field bound to vLatDeg, the formula returns NULL. :unamused: However, when I specifically cast those values as NUMBER, the correct decimal value is returned. :thinking: (And, as I mentioned above, when the variables were defined in AppGyver they were configured as type number.)

However, when a negative value is entered into the input field, the correct decimal representation is returned. :frowning_face:

It appears as though AppGyver treats a positive number entered into the input field as text even though it is bound to a variable of type number (but treats it as a number if the value entered into the input field is negative). :woozy_face:

Strange. :astonished:

FWIW, this is probably related to the question I posted a day or two ago asking if the MOD operator actually works. I suspect it was this quirky behavior that was making it appear as though the MOD operator was not working (I have not tested that - I have already wasted far too much time dealing with these issues.)

Most probably this is in connection that the input fieldโ€™s value type is number/text, so the returned value can be interpreted as text.

To make sure the behaviour is as expected in your formulas use the NUMBER(pageVars.vLatDeg)