thanks for the prompt reply* ..
*If the old syntax is used (as below), how can we fetch the virtual field 
records?*

class MyVirtualFields(object):
  def name(self):
    return myaes.decrypt(self.taxpayer.enc_name)
db.taxpayer.virtualfields.append(MyVirtualFields())*

web2py documentation says:
they do not appear in the list of db.table.fields and are not visualized by 
default in tables (TABLE) and grids (SQLFORM.grid, SQLFORM.smartgrid).

On Tuesday, 18 December 2012 18:33:43 UTC+5, Jose wrote:
>
>
>
> El martes, 18 de diciembre de 2012 10:24:08 UTC-3, at escribió:
>>
>> Using Version 1.99.7 stable on production and Version 2.2.1 stable on my 
>> development box.
>>
>> I've tried this out on version 2.2.1; it's giving error:
>>
>> db.define_table('taxpayer',
>> Field('name'),
>> Field('married', 'boolean'),
>> Field('spouse_name'),
>> Field.Virtual('namey',lambda row: row.taxpayer.name+'y'))
>> *<type 'exceptions.TypeError'> __init__() takes exactly 2 arguments (3 
>> given)*
>
>
> because it is available since version 2.3.1
>
> José 
>

-- 



Reply via email to