This is the answer to the first problem:

db.auth_user.Supervisor.requires=IS_EMPTY_OR(IS_IN_DB(db,'auth_user.id',
db.auth_user._format))

You can just remove it as it will use the format for auth_user anyway as 
that's the default. So it becomes only:

db.auth_user.Supervisor.requires=IS_EMPTY_OR(IS_IN_DB(db,'auth_user.id')

As for the Extensions I'm very confused with what you're trying to achieve 
and your table structure doesn't seem very good. Would it make more sense 
to have it like this?

db.define_table('extension',,
                Field('Supervisor' , 'reference auth_user', requires = 
IS_EMPTY_OR(IS_IN_DB(db,'auth_user.id','%(first_name)s %(last_name)s'))),
                Field('Extension_number','integer',required = True))

db.define_table('extension_member',
            Field('extension' , 'reference extension'),
            Field('member' , 'reference auth_user'),
    

I ask this because your query is utterly confusing, why would you check the 
first name and last name when you already compared the ID with person, why 
would you use "like" for an integer field. So many questions.

In your questions you need to tells us *what* you're trying to achieve not 
just *how*.

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

Reply via email to