Hello Alfonso, In my last email, I don't mean what I suggested before. But instead of using a boolean type field use just a string field (or a reference field better) so you can add new criteria if it ever happen in the future and you don't need to kind of customize the behavior of your boolean field to make it accept NULL flag...
Richard On Fri, Jul 8, 2016 at 11:21 AM, Alfonso Serra <[email protected]> wrote: > Absolutetly right, i just realised that. > > @Richard > Rather than a string field, i tried your approach using an integer and > IS_IN_SET() but the problem is that bool conversion happens after that is > executed. Hmm, actually this might work since as integer the bool > conversion wont take place, right? Thanks ill try this. > > onvalidation or onsuccess will definetly work. > Its not ideal since i have to declare such callbacks and inspect the > field's widget or something to detect the tristate. Not ideal but better > that having ifs on the controller after the form process. > > Ill read about custom fields, that may be interesting, but since the bool > conversion is done on form's process i dont think it will do the trick. But > a custom field might not do the conversion. > > Thank you all very much. Ill try these options and get back to you with > what would be best. > King Regards. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

