Why do you want to do this? Reference fields include the IS_IN_DB validator by default.
I guess you could make it a plain integer field and use requires=IS_EMPTY_OR(IS_IN_DB(db, ...)) On Monday, December 16, 2013 12:28:14 PM UTC-5, Phil Hughes wrote: > > I have some reference fields in a table and I want to be able to allow > them to be null (for a while. I have sent notnull and required to False in > the model but I get an error when I go to create a record in appadmin. > Clearly I can set them to point to a dummy record in my application but I > am wondering if there is a "right way" to make this work. > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.