About zero option, search in page for zero : http://www.web2py.com/book/default/chapter/07
<http://www.web2py.com/book/default/chapter/07>There is some explanation near IS_IN_SET... There maybe more detailed information somewhere else too... I don't use it in my code since it arrive after I start my dev or I was not aware at the begining... I should make refoctoring ;-) Richard On Tue, Apr 5, 2011 at 3:16 AM, Johann Spies <[email protected]> wrote: > On 4 April 2011 16:11, Richard Vézina <[email protected]> wrote: > >> Are course_week1 and course_week2 not null?? >> >> > No. > > >> If not you need ...requires=IS_NULL_OR(IS_IN_DB(your requires) and in >> ...represent= you should use zero option (see book about that) or something >> like that : >> >> db.t_registration_form.course_week1.represent=\ >> lambda value: (value!=None and "%(code)s" %db.courses[value]) or >> 'None' >> >> > Thanks! That solved the problem. I could not find something in the book > about a 'zero option' though. > > Regards > Johann > > -- > May grace and peace be yours in abundance through the full knowledge of > God and of Jesus our Lord! His divine power has given us everything we need > for life and godliness through the full knowledge of the one who called us > by his own glory and excellence. > 2 Pet. 1:2b,3a > >

