[web2py] Re: How to display filtered records in drop down for further selection in SQLFORM?

2017-07-12 Thread Pranshul Chitransh
That solved it. Thanks a lot! On Wednesday, July 12, 2017 at 6:06:43 PM UTC+5:30, Leonel Câmara wrote: > > Put some parenthesis on it > > Instead of this > > db(db.all_users.status==1 & db.all_users.username!='John' ) > > Do: > > db((db.all_users.status==1) & (db.all_users.username!='John' ))) >

[web2py] Re: How to display filtered records in drop down for further selection in SQLFORM?

2017-07-12 Thread Leonel Câmara
Put some parenthesis on it Instead of this db(db.all_users.status==1 & db.all_users.username!='John' ) Do: db((db.all_users.status==1) & (db.all_users.username!='John' ))) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: How to display filtered records in drop down for further selection in SQLFORM?

2017-07-12 Thread Pranshul Chitransh
Actually I've already put a query in it. Currently it ready all active users as follows db.table.input_email.requires=IS_IN_DB(db(db.all_users.status==1), 'all_users.username') And I want to further some users based on their name say John so the condition should fulfill all active users but

[web2py] Re: How to display filtered records in drop down for further selection in SQLFORM?

2017-07-12 Thread 黄祥
i think you can put query on that e.g. db.person.name.requires = IS_IN_DB(db(db.person.id > 10), 'person.id', '%(name)s') ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-validators best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book