Sorry. Cannot be done this way. Represent takes the field value, not the entire row. The reason is that when web2py tries to represent a field in a SQLTABLE or in a FORM, only that field is guaranteed to be there. the other fields may not have been fetched from the database.
Anyway... I will think this can be improved. Let us know if you have any idea. Massimo On Dec 8, 10:13 pm, Bruno Rocha <[email protected]> wrote: > I Know this is an VERY OLD post, but I was searching the group and I > now have the same need as weheh in this thread. > > db.define_table('person', > Field('name'), > Field('city'), > Field('state'), > Field('email',represent: lambda row: > A(_href=URL('changemail',vars=dict(person_id=row.id)))) > ) > > But, lambda in this case is getting row as str() with the mail adress > stored in 'email' field, I need to have the row id. > > another easy way? > > I am thinking about override the SQLTABLE class to include this kind of > option if I can't find an easy solution.

