rocket
unread,Feb 14, 2011, 1:58:27 PM2/14/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
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?