Re: [web2py] Updating computed fields

2011-02-07 Thread Bruno Rocha
I just found a better way, you can point to the defined function for compute. rows = db(db.table).select() for row in rows: row.update_record( mycomputedfield = db.mytable.mycomputefield.compute(row) ) ### I made a test now #

Re: [web2py] Updating computed fields

2011-02-07 Thread Johann Spies
Thanks! Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence.

Re: [web2py] Updating computed fields

2011-02-07 Thread Bruno Rocha
I did it before, something like: ### rows = db(db.table).select() for row in rows: row.update_record(mycomputedfield=lambda r:function(r)) ### where function(r) is the same function I used for t

[web2py] Updating computed fields

2011-02-07 Thread Johann Spies
If I have a table and add a computed field - how do I update existing records? I am speaking of tables with many thousands of records. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything