You can use labda function in your db

Field('companyField name',db.linked table name, represent=lambda c, 
row:field name of linked table(c), 
requires=IS_IN_DB(db,'field.id','%(patient)s')),

On Wednesday, 26 June 2013 10:36:03 UTC+5:30, Tom Russell wrote:
>
> Another question on the smartgrid.
>
> I have linked tables in my smartgrid like:
>
> grid = SQLFORM.smartgrid(db.patient, deletable=True, editable=True, 
> create=False, maxtextlength=64, paginate=25, links=links,
>     links_in_grid=True, linked_tables=['emergencycontacts','dependents'])
>
> When clicking on the linked table it shows the id of patient since thats 
> what reference but how can I show the name of the patient rather than the 
> id of patient?
>
> Thanks,
>
> Tom
>

-- 

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


Reply via email to