Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Checkbox Default Values Ignored (BUG)  (Read 8614 times)
SSL D.
Posts: 11


« 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";
Reuben B.
Four Js
Posts: 1119


« Reply #1 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

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


« Reply #2 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.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines