Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: SSL D. on June 03, 2011, 10:13:18 am



Title: Checkbox Default Values Ignored (BUG)
Post by: SSL D. on June 03, 2011, 10:13:18 am
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";


Title: Re: Checkbox Default Values Ignored (BUG)
Post by: Reuben B. on June 06, 2011, 04:46:53 am
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


Title: Re: Checkbox Default Values Ignored (BUG)
Post by: SSL D. on June 06, 2011, 11:17:44 am
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.