I think I've found the solution here:
http://groups.google.com/group/web2py/browse_thread/thread/1d94e9bfc9877769

    format=lambda r: r.f_tbte_project_number + r.f_client.f_name
+r.f_name



On Feb 14, 1:58 pm, rocket <[email protected]> wrote:
> Hi,
>
> I have two tables defined like this:
>
> db.define_table('t_client',
>     Field('f_name', type='string', notnull=True, label=T('Name')),
>     format='%(f_name)s')
>
> db.define_table('t_project',
>     Field('f_name', type='string', notnull=True, label=T('Name')),
>     Field('f_tbte_project_number', type='string', notnull=True,
> label=T('TBTE Project Number')),
>     Field('f_report_to', type='string', notnull=True, label=T('Report
> To')),
>     Field('f_client', db.t_client, notnull=True, label=T('Client')),
>     format='%(f_tbte_project_number)s %(f_client)s - %(f_name)s')
>
> My issue is when I reference t_project from another table, the format
> string includes the record id of the client and not the client's name
> string.
>
> What is the way to display the client's name string instead of id from
> a third table using best practices?

Reply via email to