Re: [web2py] Is there a way to have a field in one table be computed by a field in another table?

2014-01-13 Thread Kiran Subbaraman
|compute=#lamdba r: db(db.thing.owner_id == r).count()| Would something like this work? Am just guessing here, and not something that I have tried out. Kiran Subbaraman http://subbaraman.wordpress.com/about/ On 1/14/2014 11:18 AM, Apple Mason wrote: In

[web2py] Is there a way to have a field in one table be computed by a field in another table?

2014-01-13 Thread Apple Mason
In the online doc on computed field, the computed fields uses a field in the current table, and not in another table. I modified the one-to-many example by adding a 'total_items' field on person. If I want 'total_items' to be the sum of all items the person currently has, and this field should