Sorry Weheh, did not recognize you  :)
You can not achieve desied effect with lambda for represent because
lambda does not get enough information: try
db.table.name.represent = lambda o: type(o)
and you will see that lambda gets str datatype as parameter, so all
links to SQLRow etc. are lost.
You can use my update_column function, but for entire rows that will
look too ugly and take too many lines of code. I think, this is the
case when it's easier to write your own code to generate table just
like you want. Something like:

rs = db(condition).select()
for row in rs:
  current_id = str(row.id)
    table.append(TR(''' add columns ''',
_onclick="javascript:document.location = 'blah/blah' + current_id"))

On Apr 20, 11:49 am, weheh <[email protected]> wrote:
> SergeyPo - Many thanks to you for your earlier post with which I am
> already intimately familiar. I've been able to follow the advice from
> that post successfully in many other cases.
>
> However, I can't seem to figure out how to write a lambda statement
> that duplicates the link that web2py/gluon auto-creates for the id
> field. I then want to apply that href to any or all other field in the
> SQLTABLE for the purposes of making the entire row and all fields and
> entries in that row a giant link to that record.
>
> I've tried something like this but it doesn't work:
>
> db.table.name.represent = lambda row: A(_href=URL
> (r=request,f='action',args=db(db.table.id==row.id).select
> (db.table.id)))
>
> I don't know how to reference the id field while talking about the
> name field.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to