[web2py] Re: compute help

2013-08-27 Thread greenpoise
Got it working by adding float to the compute..thanks On Tuesday, August 27, 2013 2:14:17 PM UTC-7, greenpoise wrote: > > I fixed the typo. No error though! I just get None as my value. > > > > > On Tuesday, August 27, 2013 2:08:45 PM UTC-7, Anthony wrote: >> >> I would think you would get an

[web2py] Re: compute help

2013-08-27 Thread greenpoise
I fixed the typo. No error though! I just get None as my value. On Tuesday, August 27, 2013 2:08:45 PM UTC-7, Anthony wrote: > > I would think you would get an error since both price and pricecoefficient > appear to be strings rather than numeric types (also, pricecoefficient is > misspelled

[web2py] Re: compute help

2013-08-27 Thread greenpoise
I fixed the typo. No error though! I just get None as my value. On Tuesday, August 27, 2013 2:08:45 PM UTC-7, Anthony wrote: > > I would think you would get an error since both price and pricecoefficient > appear to be strings rather than numeric types (also, pricecoefficient is > misspelled

[web2py] Re: compute help

2013-08-27 Thread Anthony
I would think you would get an error since both price and pricecoefficient appear to be strings rather than numeric types (also, pricecoefficient is misspelled in the table definition). Anthony On Tuesday, August 27, 2013 1:37:51 PM UTC-7, greenpoise wrote: > > I get NONE. I have these: > > db.

[web2py] Re: compute help

2013-08-27 Thread greenpoise
I get NONE. I have these: db.define_table('supplier', Field('suppliercode'), Field('suppliername'), Field('pricecoeficient'), format='%(suppliercode)s') db.define_table('product', Field('series', 'reference series'), Field('suppliercode','reference supplier'), Field('price

[web2py] Re: compute help

2013-08-27 Thread Massimo Di Pierro
I do not know the model but looks plausible. does it not work? On Tuesday, 27 August 2013 13:02:08 UTC-5, greenpoise wrote: > > Is this correct? > > Field('cost',compute=lambda r: r['price']*db.supplier[r.supplier_id]. > pricecoefficient) > > > -- --- You received this message because you are