Hi Cliff,

the id field is handled as a special case inside SQLTABLE and the
linkto can only affect the _href portion of the anchor (A helper), not
the visible part.

But you can still do it:

rows=db(...).select(...)
t=SQLTABLE(rows)
for n,row in enumerate(rows):
  t[1][n][0][0] = A('Edit',_href=URL(r=request,args=[n]))

you can play with the values in row to customize it.

t[1] if the table's body
t[1][n] is the n-th row
t[1][n][0] is the first TD on that row
t[1][n][0][0] is the content (in this case the id value).



On Jun 22, 2:49 pm, Cliff <[email protected]> wrote:
> I'm not new to programming, but I am relatively new to Python and just
> starting my web2py journey.
>
> I have SQLTABLE working with one small exception.  For the edit link,
> I would like to replace the record id with the word "Edit."
>
> I have read the discussions in this group about using represent and
> other methods.  Represent seems to be the simplest way to go, but I
> cannot get it to work.
>
> Could someone point me to a working example?  From there I can
> probably figure it out.
>
> Thanks

Reply via email to