On Dec 24, 2010, at 2:18 PM, Carey Gagnon wrote:

> I have several check boxes in one of my app forms. Every check box is to
> state whether something is done (int value of 1) or not (int value of 0).
> Unchecked box ... no it hasn't been done, Checked box....yes it has been
> done.
> 
> I need to have these fields searchable, but can't expect the user to do a
> search such where X = 0 or X = 1.
> 
> Is there a way to create an alias for in int values of 0 and 1, so that 0 is
> no, and 1 is yes, so the user can search where X = no or X = yes?
> 
> I've search the forum and can't find anything relating to this.

        Did you know that you can do this in Python:

>>> print True == 1
True
>>> print False == 0
True

        True and False are simply aliases of 1 and 0. Technically, the bool 
type is a subclass of the int type.

        Are the fields in the database boolean or integers? 



-- Ed Leafe



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to