How to input Boolean in MYSQL table field using Wappler

By now most of us that are new to Wappler has ran into this issue and probable spend one day too long testing. I am talking about, false vs ‘false’, true vs ‘true’ in Wappler. In your database insert or update if enter false without the ’ ’ this is saved as a Boolean thus inserting a zero (0) likewise true without the ’ ’ insert a one (1). This is great when working in MYSQL database that doesn’t really reference Boolean but rather TINYINT.

So, to have a default Boolean returns 0 or 1 in your MYSQL database do this
image

and to save a string as ‘false’ or ‘true’ do this.
image

This is not groundbreaking discovery it’s just a reminder not to go crazy when your Wappler Condition seems to not be doing the right thing.

Community Page
Last updated: