Log In    |    Knowledge Base    |    4D Home
Tech Tip: Displaying Null number values
Published On: December 17, 1999

Numbers in a fields or variable will always contains a value. 4D does not have a null value for numbers. The number 0 (zero) is considered a value. One consequence for this is that a number will always display with a value.

On the other had, if an alpha field has a value of no characters, it will displayed as blank. If you want to display a “numeric” field with no characters displayed when the number has a value of 0, it is possible to display the number in an alpha field. This is done by simply by converting the data to a string.

An example of code to do this is:

If ([Table1]Number_Field=0)
End if

Note, the number data types 4D supports are, Integer, Long Integer and Real.