Hi!

I have a field called "Job Type", and another field "database" that
depends on the type. If the user selects "Train" for Job Type, they
don't need to enter a database (a integer id), but i don't know how to
make validators do this for me.

Right now I have this:

db.jobs.db.requires =
IS_NULL_OR(IS_IN_DB(db((db.quikr_database.username == auth.user.email)
| (db.quikr_database.share_with_others == True)),
db.quikr_database.id, '%(name)s'))

Either it can be null (in the case of Train) or otherwise it needs to
be in the list of shared quikr_databases.

Any ideas?

-- 
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.

Reply via email to