How can i create an incremental addition of other values in a database table and sum them up in one column? Is there a way to sum() the wanted values in one column to create a wanted database value total like i attempted in the *TOTAL* field in the below code example? I tried something like the code below but of-course it didn't work, so i was wondering if there is a way to achieve something like this.
db.define_table('addThem', Field('quantity', 'integer'), Field('price', 'float'), Field('totalPrice', compute=lambda r: r['price']* r[ 'quantity']), *Field('Total', writable=False, compute=lambda r: (r['totalPrice']).sum()))* Mostwanted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.