I am well aware of the usage of IS_IN_DB in web2py however I want to select 
some particular values of the table in drop down.
Like presently this attribute selects all users registered in the 
application.

db.Field('selected_users','string',requires=IS_IN_DB(db,db.auth_user.id,
'%(Name)s',zero=None))

However I just want to list down the verified users i.e.
the query should be:

query=((db.auth_user.id>0) & (db.auth_user.registration_key==""))

How do I fit it with the model:
Is this correct? Doesn't seem to work in my case though.
db.Field('selected_users','string',requires=IS_IN_DB(query,db.auth_user.id,
'%(Name)s',zero=None))

Thanks in advance,
Regards,
Akash

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