I have the following form that uses 3 different tables and when I submit
the data it all seems to submit correctly but when I view the data in a
smart grid with linked tables in the columns clicking on the link does not
show any record for the row of linked data.

My smartgrid code:

def manage_patients():
    db.patient.id.readable=False # Since we do not want to expose the id
field on the grid
    grid = SQLFORM.smartgrid(db.patient, deletable=True, editable=True,
create=True, maxtextlength=64, paginate=25,
linked_tables=['emergencycontacts','dependents'])
    return dict(grid=grid)

My linked tables:

db.define_table(
    'dependents',
    Field('dep_id',db.patient, writable=False, readable=False),
    Field('dep_firstname', label='First Name'),
    Field('dep_middlename', label='Middle Name'),
    Field('dep_lastname', label='Last Name'),
    Field('dep_relationship', label='Relationship',
requires=IS_IN_SET(['Aunt', 'Uncle', 'Parent', 'Sibling', 'Spouse',
'Guardian'])),
    auth.signature)

db.define_table(
    'emergencycontacts',
    Field('ec_id',db.patient, writable=False, readable=False),
    Field('em_first_name', label='First Name'),
    Field('em_middle_name', label='Middle Name'),
    Field('em_last_name', label='Last Name'),
    Field('em_address1', label='Address1'),
    Field('em_address2', label='Address2'),
    Field('em_city', label='City'),
    Field('em_state', label='State'),
    Field('em_zipcode', label='Zip Code'),
    Field('em_country', label='Country'),
    Field('em_phone', label='Phone'),
    Field('em_relationship', label='Relationship',
requires=IS_IN_SET(['Aunt', 'Uncle', 'Parent', 'Sibling', 'Spouse',
'Guardian'])),
    auth.signature)

I believe I am doing this correctly but cannot bring up the data for each
row to the linked tables.

Any ideas?

Thanks

-- 

--- 
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/groups/opt_out.


Reply via email to