True for the simple example shown but you can not use IS_IN_DB when
you need to show fields from more than one table:

# whatever query is the same in both cases
q=((db.person.age>35)&(db.dept.id==db.person.dept_id))

r=db(q).select(db.person.id,db.person.name,db.dept.name)

# but this select can not be created with IS_IN_DB today
db.person.name.widget= lambda self,value: \
   SELECT(_name='name',*[OPTION('%s in %s'%
(e.person.name,e.dept.name),_value=e.person.name) for e in r])

because IS_IN_DB builds self.fields from the 2nd arg (field) only and
not from the 1st arg (dbset) which knows all the tables used.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to