Number field that accepts a period (1 Viewer)

Clicky

New member
Local time
Today, 11:59
Joined
Jul 12, 2018
Messages
4
Is there a number field that will accept a period as the only entry? Trying to create a variable for number of days but would like a period to signify missing/not reported. Is there a way to do that besides designating the field as a text field? Thanks!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:59
Joined
May 7, 2009
Messages
19,169
No. Blank can signify missing.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:59
Joined
Feb 19, 2002
Messages
42,971
Null is used to signify unknown. There is no reason to create an arbitrary additional value. Decimal points are not stored in numeric fields. The decimal point is strictly for display purposes so No, you cannot store just a period unless you define the field as text which will cause other problems.
 

Clicky

New member
Local time
Today, 11:59
Joined
Jul 12, 2018
Messages
4
Thanks for the replies! It would be nicer to have a specific entry for missing/not reported as null/blank could mean a user forgot to answer it, but I have a work-around. Thanks!
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 13:59
Joined
Feb 28, 2001
Messages
26,999
In general,using some specific value of a user's response to mean something special is a bad choice. Like using a question such as "On a scale of 1 to 10, how would you rate...?" and then using 0 as "no answer (passive)", -1 for "expressly claims to have no opinion", -2 for "expressly declined to answer", -3 for "VEHEMENTLY declined to answer (and the assault trial starts next week)" and so on.

The reason it is a bad idea is that it quickly devolves into a situation where the answer means two different things depending on values. I.e. in one range, it is a usable set of values, but in another range it says someone about the person, not about the answer. This makes queries tougher when you want to take average responses. If you are splitting hairs, one could argue the point (admittedly not strongly) that using two possible classes of meanings for the same field is a normalization violation because in one range it is data but in another range it is metadata.

It is far better to have a yes/no flag somewhere that says "no answer" and if the flag is NOT set for "no answer" then you look at the slot contents. That's a FAR easier WHERE clause to write.

If you have a data entry form, it is easy to have the flag default to the "No Answer" case but then put a Change event handler behind the code value. If someone offers a number, the Change event handler can reset the flag behind the scenes so the flag needs neither a separate control nor explicit maintenance.
 

Clicky

New member
Local time
Today, 11:59
Joined
Jul 12, 2018
Messages
4
Thanks for the reply! I created a drop down field to ask Yes/No if info is available and then the next field is if Yes, to enter the #. Thanks again!
 

Users who are viewing this thread

Top Bottom