Check for NULL Value


I have a situation where the following scenario needs to be checked.

NULL = Display Error

0 = OK

0 = OK

I understand that the concept of NULL in NAV does not exist is there some other way of achieving the above.




Please check this,…/how-to-check-for-null-values-for-interger-option-etc

what ttype of field is it?
you can check ‘’ as NULL
IF variable = ‘’ then
ERROR(‘Null value’);

The field is a decimal

Yes, null concept isn’t there. But decimal value in NAV is either 0, less than 0 OR greater than 0. There can’t be any other value. What is your actual requirement?

The customer wants the field to have as default a value of NULL, the only two values that can then be entered are 0 or anything greater than 0. Is this possible.

you can use initvalue property of the field to initialize field to 0 when record is created.

There is a property BlankZero.
Please check the details here >…/dd338713.aspx

This property might help you in achieving what you want i.e. If you set it to yes then the default value will be zero but it will display blank (or null) on the form.

I think your only option is to initialize the value to ‘-1.0’ then test if the value is <0 give an error forcing the user to type either 0 or a positive decimal greater than zero.