I have 4 tables with relations (see below ) and I want to show a dropdown list that shows a string with one field from each table by using something like: db.customer.price.requires=IS_IN_DB(?)
I tried : query=((db.price.product== db.product.id)&(db.price.cust_type== db.cust_type.id)) db.customer.price.requires = IS_IN_DB(db(query), db.shop_price.id,'%(cust_type.name)s %(product.name)s %(price.unit_price)s') ... and it didn't work db.define_table('customer', Field('name'), Field('price','refrence price )) db.define_table('price', Field('product', 'reference product', Field('cust_type', 'reference cust_type' Field('unit_price', 'decimal(8,4)') db.define_table('product', Field('name') db.define_table('cust_type', Field('name') Is it at all possible ? any better way to do it ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.