How to keep zero ("0") being recognized on the server as Unassigned

RODA Gurus,

I have a need to distinguish the difference between zero (“0”) and NULL in our Oracle DB for fields which are bound to a NUMBER data type.

But in the OnBeforeProcessChange event of a given business processor, assigning a value of “0” resolves to true. Which I find odd, because checking the value at run time reveals it is equal to “0”, yet it still resolves as being equivalent to “Unassigned”.

if NewValueByName[‘COPAY_INN’] = Unassigned then

So, as the subject asks:
How does one make a “0” not be equivalent to 'Unassigned" when the subject field is bound to a NUMBER data type?

Please advise…

Regards,
Monte Carver

Delphi 10 (Seattle)
RODA 9.2.101.1295

I’m sorry, but I don’t understand you. can you rephrase, pls?

Delphi doesn’t support Nullable types yet so nil can be recognized as 0 and vice versa if it is cast to integer types.

you can use VarIsNull, VarIsEmpty for detecting state of Variant value in Delphi.


EDIT: on client-side, you can clear field with Field.Clear or via assigning Null value

Using VarIsEmpty solves my problem.

Thank You !