Hi guys,
Not sure whether it’s a bug.
Ah well, I have a column that is defined as integer in both the physical database and Servoy .dbi file.
The column goes into a calculation of type ‘TEXT’ that returns something like this: aStringPrefix + integerNumber + aStringSuffix.
All good unless either prefix or suffix are null. Then the calc returns 1.0 though integerNumber value is 1.
Otherwise works fine and if I set the prefix/suffix to an empty string then all is good too.
Cheers,
Maria
the problem is that in javascript all numbers are double’s (floating point)
If you use the number to concat with a string, then you need to “format” the number look at Number.toFixed() for example
jcompagner:
the problem is that in javascript all numbers are double’s (floating point)
If you use the number to concat with a string, then you need to “format” the number look at Number.toFixed() for example
Interesting - when I concatenate it there is no issue with the decimal point.
It’s only when the strings are null.
Cheers,
Maria
If the string is null, then it ‘assumes’ an addition, so aNullString + aDouble, will give you a double.
Where aNonNullString + aDouble concatenates.