Re: [web2py] compute=lambda r: don't return all the fields

2011-12-21 Thread Vinicius Assef
As book says... "DAL fields may have a compute attribute. This must be a function (or lambda) that takes a Row object and returns a value for the field." So, lambda for computed fields gets all fields and returns just one field. I think it work on DAL level, not on FORM level. On 12/19/11, Ric

Re: [web2py] compute=lambda r: don't return all the fields

2011-12-19 Thread Richard Vézina
I don't get all my db.table fields form define_table fields defined... A other guy report that... But didn't find exactly why his compute functions as stop working properly... To me it's related to the fact tha if I do : Field('mycomputefield', compute=lambda r: r) I am not getting all the fiel

Re: [web2py] compute=lambda r: don't return all the fields

2011-12-19 Thread Anthony
What do you mean it doesn't return all the fields? On Monday, December 19, 2011 10:47:42 AM UTC-5, Richard wrote: > > Hello, > > I try to use compute to generate a record md5_hash on insert and > update, but I discover that compute=lambda r: don't return all the > db.table fields why? > > Thanks >

[web2py] compute=lambda r: don't return all the fields

2011-12-19 Thread Richard
Hello, I try to use compute to generate a record md5_hash on insert and update, but I discover that compute=lambda r: don't return all the db.table fields why? Thanks Richard