I'm wanting to munge the Rows I get back from the DB when I do my query; kind of a custom group-by. This involves adding an integer field and concatenating a string field. So I was wanting to take the first Row, and put it into another object ... dict or Storage or Rows. I was hoping to use the outwardly simple SQLTABLE to display the results (as I do for the un-munged results).
If I use a Storage object (import from gluon.storage), I can copy the row (for row in rows:, and then us row.id for the new key) but then SQLTABLE wants to get back to the DB self.attributes = attributes self.sqlrows = sqlrows (components, row) = (self.components, []) if not sqlrows: return REGEX_TABLE_DOT_FIELD = sqlrows.db._adapter.REGEX_TABLE_DOT_FIELD *sqlhtml.py in __init__ at line 3195* (and print rows doesn't show anything about db or adapter.) If I try to use a Rows object (import from pydal.objects), I can't append, add, or assign a row, which means I can't get far enough to see if the DB problem occurs. I can munge in place, since a Row object is mutable, but then I have donor rows that I don't want to display. Can I get rid of them without changing the DB? [I'm considering updating the DB with the munge results, but for now I just to do it to the display.] This is perhaps a silly question; it arises from the observation that I don't do the data entry in an optimal way. I pick up item 1, read the values to fill in the form, and submit the form ... and then find I should have done quantity 2 instead of 1, and appended a flag field appropriate to the second item (it indicates the manufacturing plant). So the munging does the combining that should have happened at data entry. Thanks. Dave /dps -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

