Checkbox Default Values Ignored (BUG)

Started by SSL D., June 03, 2011, 10:13:18 AM

Previous topic - Next topic

SSL D.

It seems that the checkbox default values are picked up if you use test rather than a boolean.

Within the Form (per)

This does not set the default value:

CHECKBOX d1  = FORMONLY.day1, NOT NULL, TITLE="Monday",
               VALUECHECKED="Y", VALUEUNCHECKED="N", DEFAULT="N",
               COMMENTS="Allow Ext.Lab";

This does:

CHECKBOX d1  = FORMONLY.day1, NOT NULL, TITLE="Monday",
               VALUECHECKED=1, VALUEUNCHECKED=0, DEFAULT=0,
               COMMENTS="Allow Ext.Lab";

Reuben B.

Hi,

Your first sentence doesn't make sense.    Perhaps post the .4gl code to go with it.  I will point out that 'Y' and 'N' are not valid BOOLEAN values https://4js.com/online_documentation/fjs-fgl-manual-html/User/DataTypes.html#DT_BOOLEAN and that maybe where the issue lies.

Reuben
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero

SSL D.

Sorry I wrote the word "test" rather than "text".

The problem is that when you use a CHAR variable and then Y/N values, the default "N" is ignored.

However, if you change the variable to BOOLEAN and use 1/0 values, the default 0 works correctly.

Therefore if you use the checkbox with text values ("Y" & "N") the default "N" does not work.

Additionally, Please note we are a team of developers who understand variables.