How can I select a foreign key and represent the value? I want to represent 
the entire group and now have to do individual queries for each foreign 
key. Is that possible?

db.define_table('table1',
               Field('field_1'),
               format='%(field_1)s')

db.define_table('table2',
               Field('field_1', 'reference table1'),
               Field('field_2', 'string),
               format='%(field_1)s')

So in this example I would do data = db(db.table1).select() which returns a 
rows object. But the reference table1 returns an integer instead of the 
actual value stored in the field.

How could I retrieve the value instead of the integer and is it possible to 
do it in bulk? 

-- 
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.

Reply via email to