In a controller I have this:
fields=[db.table.id.count()]
columns = [str(db.table.id.count())]
headers = {str(db.table.id.count()):'Total recs',}
rows=db(qry).select(*fields)
t=SQLTABLE(rows, columns=columns, headers=headers)
How can I use .represent on the calculated field
db.table.id.count()
in order to show a number if count()>0, and '' otherwise?
If not with .represent, is there any other way to achieve the same?
I have tried:
db.table.id.count().represent = lambda v: ...
but now I am lost.
--