Re: [web2py] Re: SQLFORM.grid Export and represent

2014-04-16 Thread John Fraser
The problem is I need the values 'as displayed to the user' for all referenced fields. So I need the represent value for some fields and do not for others. I was over thinking the problem and Cliff pointed me in the right directionThanks as this appears to work. Vars not Args if '_export_t

[web2py] Re: SQLFORM.grid Export and represent

2014-04-16 Thread Anthony
Also, I believe CSV does not use the represent attribute (i.e., it returns the raw values) -- only TSV converts the values via represent. So, maybe just disable TSV. Anthony On Wednesday, April 16, 2014 1:29:30 PM UTC-4, Cliff Kachinske wrote: > There must be something in the request that indi

[web2py] Re: SQLFORM.grid Export and represent

2014-04-16 Thread Cliff Kachinske
There must be something in the request that indicates you want csv or tsv. If it's in the request.args, for example, something like this would work: if 'csv' not in request.args and 'tsv' not in request.args: db.inventory.cpu_status.represent = lambda cpu_status, row: SPAN( ... On Wed