not at all:
Given

db.define_table('person',SQLField('name'))
db.define_table('dog',SQLfield('name'),SQLField('owner',db.person))

1) Without joins

db.dog.owner.represent=lambda id: db.person[id].name

then {{=db(db.dog.id>0).select(orderby=db.dog.name)}} or {{=crud.read
(db.dog,1)}}

2) Use a join

then {{=db(db.dog.owner==db.person.id).select(orderby=db.dog.name)}}

Hope this helps.

Massimo

On May 13, 1:41 pm, Jurgis Pralgauskis <jurgis.pralgaus...@gmail.com>
wrote:
> hello,
>
> now in table (select) view and record (reed) view
> only values from current table are shown
>
> but in record (update)  view the foreign table values are in dropdown
> box
>
> I'd like to see theese foreign values in table (select) and record
> (reed) views... (automatically using crud)
>
> would it be hard to hack?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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