Apparently something is not correct as I cannot figure out what the syntax
erro is based on the example you gave here.

This is what I have:

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


On Wed, Jun 26, 2013 at 2:49 AM, Rohitraj Sharma <
rohitraj.sha...@themislexsol.com> wrote:

> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
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