What about: db.dog.name.represent = lambda dogname: A(dogname,_href=URL(r=request,f='view',args=dogname)) return dict(table=SQLTABLE(...))
On Mar 2, 10:13 am, Philip <[email protected]> wrote: > When using the 'linkto' argument of SQLTABLE(), is it possible to make > the linked field a field other than the id? I want to pass the id as > the argument in the URL, but I do not want to display the id in the > HTML table. > For example, if my table had two fields, dog and name, I would like to > do: > SQLTABLE(db().select(db.dog.name),linkto='xxxx'), so that users could > click on the dog's name to follow the link, rather than having to do > SQLTABLE(db().select(db.dog.id,db.dog.name),linkto='xxx') and having > users click on the dog's id. > As it is, if I do not select the id field, there is no link shown, > even if linkto argument is specified. > Thanks, > Philip -- You received this message because you are subscribed to the Google Groups "web2py-users" 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.

