> On Dec 24, 12:25 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> > db.dog.owner.display=lambda id: db(db.person.id==id).select()[0].name
> > and t2.displays(db.dog) will show you the owner's name not his id.

Oops, still have an issue here.
If the owner field is blank for a record then this fails:
SyntaxError: SQLRows: no such row

Is there a way to make this fail gracefully if the field is blank?
(I want many fields to be optional, but if-populated to display
meaningfully..)

Many thanks,
F
--~--~---------~--~----~------------~-------~--~----~
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