Thank you!

On Friday, September 27, 2013 8:14:55 PM UTC+2, Massimo Di Pierro wrote:
>
> I can confirm the problem and I opened a ticket:
>
> https://code.google.com/p/web2py/issues/detail?id=1692
>
> On Thursday, 19 September 2013 03:49:35 UTC-5, hiro wrote:
>>
>> In the book I read:
>>
>> *Showing virtual fields in SQLFORM.grid and smartgrid*
>> In recent versions of web2py, virtual fields are shown in grids like 
>> normal fields: either shown alongside all other fields by default, or by 
>> including them in the fields argument. However, virtual fields are not 
>> sortable.
>>
>> However, if i use the welcome app and define:
>>
>> db.define_table('entity',
>>     Field('entity_name', 'string'),
>>     Field('slogan', 'string'),
>>     Field.Virtual('slogan2', lambda row: row.entity.slogan+', it is 
>> really the best.')
>> )
>>
>> and then create a grid:
>>
>> def index():
>>     my_grid = SQLFORM.grid(db.entity)
>>     return locals()
>>
>> Reading the book I expect this to work. However I get the error 'Query 
>> Not Supported: no such column: entity.slogan2' in the smartgrid.
>>
>> Massimo, is this related to to the same bug I asked about yesterday? (I 
>> have not yet updated my web2py to trunk, but did not find anything about 
>> this issue in the tracker.)
>>
>> One solution might be to change the Virtual Fiels to computed fields.
>>
>> A big hug to all web2py contributors!
>>
>> Edit: Using stable version of 2.6.4
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to