Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Questions and Answers >> Null (empty) values in number fields?
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1464184998

Message started by mrkwr on May 25th, 2016, 10:03am

Title: Null (empty) values in number fields?
Post by mrkwr on May 25th, 2016, 10:03am

Is it possible to have a null (empty) value in a number field (i.e. attribute)? I'd like to distinguish entered values of zero from notes where no value has been entered, but doesn't seem to be possible?

Title: Re: Null (empty) values in number fields?
Post by Mark Bernstein on May 25th, 2016, 10:15am

No, there's not a distinguished value of "empty".

You can accomplish the effect in several different ways.

a) For attributes that naturally have non-negative values (for example, $Price or $BooksSold), a value of -1 can represent "not applicable".

b) Even where negative values are plausible, a specific value that is unlikely to occur in real life can be used. This is called a "sentinel" value.

c) A separate boolean attribute can serve to indicate whether the value is empty or not.

Title: Re: Null (empty) values in number fields?
Post by mrkwr on May 25th, 2016, 10:18am

Thx. One of those will do the trick for me.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.