This cannot be done with represent. The function is design to provide
a representation for an individual field and there is no way to access
other fields from within the function.


On Sep 19, 10:52 pm, weheh <richard_gor...@verizon.net> wrote:
> I know this issue has come up before but I'm having a hard time
> finding the answer. My table has fields x and y. I want to do a
> represent like this:
>
> db.mytable.x.represent=lambda val: XML('<div class="highlighted">%s</
> div>'%val) if (x and not y) else val
>
> Well, obviously, the above won't work. However, in general, is there a
> way to interrogate the values of other fields from the same row using
> the represent lambda function? I seem to recall the answer is no, but
> I can't seem to find the answer easily.

Reply via email to