On 2008 Dec 12, at 10:32, Beverly Voth wrote:

On 12/12/08 11:18 AM, "Ron" <[email protected]> wrote in whole or in part:

What do most developers do for a field that should be Yes/No, since there is
no Boolean data type?

FM 8.5

Ron

Starting from all versions. I create a value list "one" with the single value "1". Then I use a checkbox on the layout with this valuelist for any
field I want to "toggle/boolean".

Yes. "empty" is not the same thing as "0". If you need 1/0, then create a
button on the checkbox with the script step:
    Set Field [ myfield; abs( myfield -1 ) ]
AND auto-enter "0" in the field definitions, to start out "off".

I usually test for NOT "1" and let it go at that (empty, 0, all the same) rather than the script step. But some things must be "on/off" and never
empty....


100% what I would've said, except from a much more credible source.

Reply via email to