Be aware that with 1.99.2 you need to write it like this : db.auth_user.id.represent = lambda id*, row*: db.auth_user(id).first_name if id!=None else 'N/A'
Even if you don't need the row element... Richard On Thu, Nov 3, 2011 at 4:28 PM, Richard Vézina <[email protected]>wrote: > Is this what you trying to do : > > db.auth_user.id.represent = lambda id: db.auth_user(id).first_name if > id!=None else 'N/A' > > > On Thu, Nov 3, 2011 at 4:08 PM, Bianca Cadaveri > <[email protected]>wrote: > >> Hello, >> >> I have a number representing somebody in auth_user. How can I get the >> username back ? db.auth_user.id.represent(this_number) does not work. >> Can somebody please help me ? >> >> Thank you, >> BC > > >

