Re: [web2py] requires IS_IN_DB set as a union of two queries

2014-05-28 Thread Carlos Costa
Have you tried something like: query1=((db.vehicle.id==db.owner.own_veh_fk)&(db.owner.own_end_date!=None)) query2=(~db.vehicle.id.belongs(db(db.owner.own_veh_fk==db.vehicle.id )._select(db.vehicle.id))) query = query1 & query2 db.owner.own_veh_fk.requires=IS_IN_DB(query,'vehicle.id', '%(manufac

[web2py] requires IS_IN_DB set as a union of two queries

2014-05-28 Thread 98ujko9
Thank you Mr. Massimo and your colleagues for bringing the web2py to the masses. I need to have a field that will present a choice of values that result from a union of query1 and query2 How can i create a set that would go where the question mark is? Thanks for any help! query1=((db.vehicle.i