On Tue, Feb 21, 2012 at 8:22 PM, Richard Vézina <ml.richard.vez...@gmail.com
> wrote:

> db.dog.owner.requires = IS_IN_DB(db,db.person.id, db.person(db.person.id
> ).name)
>
> Then if that is possible, why not :
>
> db.dog.owner.requires = IS_IN_DB(db,db.person.id,'%s' % db.person(
> db.person.id).name db.othertable(db.person(db.person.id
> ).fk_to_other_table_id).field_other_table)
>


Not possible, but this is possible:

db.dog.owner.requires = IS_IN_DB(db, db.person.id, *lambda row:
db(db.othertable.foreign_key == row.reference_key
).select().first().somefield*)

-- 

Bruno Rocha
[http://rochacbruno.com.br]

Reply via email to