Hi,
I have a model like this:
db.define_table('patient',
Field('name','string'),
Field('first_name','string'),
Field('dob','date'),
Field('disease','string', requires=IS_NOT_EMPTY()))
db.define_table('injection',
Field('id_patient', 'reference patient', writable = False, readable =
False),
Field('date_iiv', 'date'),
Field('product','string'))
I'd like to use SQLFORM.grid to display in addition to all fields an
extracolumn counting the number of injections i.e:
Name / First Name / dob / disease / NUMBER of INJECTIONS
the number of injection being count for each row with this query:
count_iiv = db(db.injection.id_patient == db.patient.id ).count()
How can I include that in the SQLFORM.grid definition?
Thanks,
Mike
--
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.