How to get checkbox on form for binary datatype, why does it show “varchar” datatype?

Hi, I’m new to scriptcase. I have read several of the checkbox discussions in this forum, but still can’t do the simple thing that I want to do.

I have boolean datatypes, and want a checkbox to appear on the form - check for setting TRUE, uncheck for setting FALSE.

When I go to form and choose the datatype as “checkbox”, I get the SQL type as VARCHAR, which is a mismatch. This does not make sense to me, except that perhaps this is the wrong way to get a simple binary checkbox on the form. I have attached 3 files.

The best I can do is configure the Select configuration box for manual, use two radio buttons, one for true=1, the other for true=0. But this is not what I want.

There must be a way for Scriptcase to put a simple binary type checkbox on the form.

Thanks in advance for your help!

SCImage1.jpg

SCImage2.jpg

SCImage3.jpg

I think the datatype I should have used was “bit” for a simple single bit true/false value. I have tried it with that, and scriptcase seems to categorize this as “TINYINT”. I still cannot get a simple single checkbox (checked=true/unchecked=false) to show on the form after trying various configurations. This must require a different approach than what I am doing…

Hi,
what database are you using? In MySQL the data type would be TINYINT.
You also have to set a value in the Lookup Settings.

jsb

checkbox.jpg

In general I advise people to use Y/N fields if they need a binary value or 1/0 Then setting checkboxes and let them reply to checked /unchecked is fairly straight forward. If you need checkboxes then I useually make them tinyint and set numeric values. There’s no real advantage using boolean fields in your database.

thanks @jsbinca