db "person" with 2 fields: db.define_table('person', Field('firstname', type='string'), Field('familyname', type='string'), ..... )
Need to make this table visible in SQLFORM.grid / SQLFORM.smartgrid, or SQLTABLE based on a JOIN query: q = ((db.person.id == db.othertable.person_fk)) rows = db(q).select(db.person.firstname, db.person.familyname) Due to the JOIN, several rows have the same person, but every person may be displayed only once. So tried this: t = SQLTABLE(rows, *distinct = True*) But still the same person is shown several times in the table. In fact I need the combination of "firstname" + "familyname" to be distinct. I read in the book that "distinct" can also be an expression. Can this help in this case? And then what is the syntax? Thank you for your help -- 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.