Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Null (empty) values in number fields? (Read 511 times)
mrkwr
Full Member
*
Offline



Posts: 75

Null (empty) values in number fields?
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?
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Null (empty) values in number fields?
Reply #1 - 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.
Back to top
 
 
WWW   IP Logged
mrkwr
Full Member
*
Offline



Posts: 75

Re: Null (empty) values in number fields?
Reply #2 - May 25th, 2016, 10:18am
 
Thx. One of those will do the trick for me.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print