I am trying to add up values in my DB, in the averages column to end up with a summed up value of total averages, i chose the computing fields methods but i'm not familiar with it, i am not getting the values i need, i keep getting null in my DB.
db.define_table('marks', Field('average', 'float', readable=False, writable=False), Field('grade', readable=False, writable=False), * #the line below is where i really dont know what i'm doing in the lambda function* Field('totalAverage', readable=False, writable=False, compute=lambda r: r['ave=0, ave+=average']), Field('averageGrade', readable=False, writable=False), Field('comments',type='text',requires=IS_NOT_EMPTY()), ) -- 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.