[web2py] Re: Creating a sums value from a column on an SQLFORM.grid

2022-04-07 Thread Jim S
It looks like there is support for groupby in SQLFORM.grid which is what you'd need to build the proper SQL statement. I haven't tried this with web2py. If I were, I'd try adding a groupby clause and a list of fields that include your sum field. Something like this (not tested)

[web2py] Creating a sums value from a column on an SQLFORM.grid

2022-04-07 Thread mostwanted
Hi guys, I was wondering if i could create a sums column on an SQLFORM.grid so that every search that's made produces a sums value, something like this: *def payments():grid = SQLFORM.grid(db.payments, args=[db.payments]) if grid.process().accepted:query=("#Search queries of