Announcement

Collapse
No announcement yet.

Boolean handling in batch mode

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:
    Please, enter your email:
    [___________________]
    [X] I would like to receive newsletter.
    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.

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

    Comment


    • #3
      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.

      Comment


      • #4
        Hello,

        I will discuss your suggestion with our team.

        regards,
        Bernhard Bernsmann

        Comment


        • #5
          Originally posted by Giblet535 View Post
          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.
          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.

          Comment


          • #6
            Originally posted by paulomarcelo View Post
            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.

            Comment

            Working...
            X