Re: [web2py] Re: drop-box with a subset of values

2011-06-27 Thread Anthony
Yes, web2py has lots of neat tricks. Rather than a whole db connection, the IS_IN_DB validator can also take a DAL Set to limit the records shown -- see http://web2py.com/book/default/chapter/07#Database-Validators. On Monday, June 27, 2011 4:44:52 PM UTC-4, mweissen wrote: > Oooops - thank you

Re: [web2py] Re: drop-box with a subset of values

2011-06-27 Thread Martin Weissenboeck
Oooops - thank you very much. I think I could have found the difference between "color" and "colors" myself :-( About the solution: it works very well and it is very import for my project. I have tried to find a solution for several hours and now I have got it in 10 minutes. web2py is great! Tha

Re: [web2py] Re: drop-box with a subset of values

2011-06-27 Thread Anthony
It's just a typo -- db.color.gr and db.color.id should be db.colors.gr and db.colors.id. Anthony On Monday, June 27, 2011 4:35:01 PM UTC-4, mweissen wrote: > Hi Massimo, > looks great. But I got: > > web2py™ Version 1.97.1 (2011-06-26 19:25:44) Python Python 2.5.4: > C:\Web2Py\web2py_win\

Re: [web2py] Re: drop-box with a subset of values

2011-06-27 Thread Martin Weissenboeck
Hi Massimo, looks great. But I got: web2py™ Version 1.97.1 (2011-06-26 19:25:44) Python Python 2.5.4: C:\Web2Py\web2py_win\web2py\web2py.exe TRACEBACK 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceback (most recent call last): File "gluon/restricted.py", line 192, in restricted File "C:/Web2Py/web2p

[web2py] Re: drop-box with a subset of values

2011-06-27 Thread Massimo Di Pierro
yes db.person.color.requires=IS_IN_DB(db(db.color.gr=='A'),db.color.id,'% (color)s') form=SQLFORM(db.person) On Jun 27, 3:12 pm, Martin Weissenboeck wrote: > Hi, > I need a SQLFORM with a special drop-box with a subset of values. > > This is a simplified example, the whole problem is a little bi