Boolean handling in batch mode

Two weeks in and I have a pet peeve.

ScriptCase uses checkboxes to represent boolean values on their sales/demo site. You’ve seen it:

[INDENT]Please, enter your email:
[___________________]
[X] I would like to receive newsletter.
[/INDENT]

Why can’t SC handle booleans in a database the same way?

Every other PHP generator can and does do this. By default!

Every human who has touched a mouse understands that Checked = TRUE/YES and Unchecked = FALSE/NO.

What is the field’s datatype? What is the value that scriptcase saves in database when you checked? Did you set the manual lookup?

The field’s data type is BOOLEAN. SC incorrectly interprets boolean as integer. Boolean is not the same thing as integer.

Yes, I know about manual lookup.

I’m not asking anyone here for tips on handling boolean values in ScriptCase. I already know that ScriptCase can’t handle booleans, and that I have to go through a lot of extra steps because ScriptCase can only handle a few basic data types.

What I’m suggesting is that ScriptCase should be able to generate appropriate code for the given input data. It does not.

True/False and-or Yes/No are extremely common in databases and web pages, but ScriptCase can’t do it.

See? It’s a good suggestion.

Hello,

I will discuss your suggestion with our team.

regards,
Bernhard Bernsmann

[QUOTE=Giblet535;23651]The field’s data type is BOOLEAN. SC incorrectly interprets boolean as integer. Boolean is not the same thing as integer.

Yes, I know about manual lookup.

I’m not asking anyone here for tips on handling boolean values in ScriptCase. I already know that ScriptCase can’t handle booleans, and that I have to go through a lot of extra steps because ScriptCase can only handle a few basic data types.

What I’m suggesting is that ScriptCase should be able to generate appropriate code for the given input data. It does not.

True/False and-or Yes/No are extremely common in databases and web pages, but ScriptCase can’t do it.

See? It’s a good suggestion.[/QUOTE]

For this situation I usually use char data type to save in database Y(Yes) and N(No) and I do the manual lookup, another approach is to use a int datatype and to save in database 1(Yes) and 0(No) and I do the manual lookup. I use scriptcase since 2008 so I learned that sometimes you have to be creative to find solutions alone or with the forum’s help.

Thank you, even though you ignored a clear statement that I don’t need a workaround.

The only correct data type for boolean data is BOOLEAN.

Yes, one can force anything to behave like a boolean data type, but only one data type is boolean.

The purpose of the BOOLEAN data type is universally understood: no programmer who looks at a BOOLEAN field is going to store a “Y” or “N” in that BOOLEAN field.

Every other PHP RAD tool understands BOOLEAN and, by default, provides a checkbox for its UI element.

This is a suggestions forum. Workarounds probably belong in the Forms forum.

I suggest that ScriptCase should generate checkboxes for BOOLEAN fields. It makes sense. Every person in the world who can push a mouse understands what a labelled checkbox means.