On Wednesday, June 12, 2013 4:21:05 AM UTC-4, CrC Nommack wrote:
>
> Hello, sorry to bother you guys but I can figure it out how I can solve 
> this problem.
> I have the following tables:
>
> ########################################
> db.define_table('t_unit',
>     Field('f_unit', type='string', label=T('Unit')),
>     auth.signature,
>     format='%(f_unit)s',
>     singular="Unit",
>     migrate=settings.migrate)
> ########################################
> db.define_table('t_offices',
>     Field('f_office', type='string', label=T('Office number')),
>     auth.signature,
>     singular="Office",
>     format='%(f_office)s',
>     migrate=settings.migrate)
> ########################################
> db.define_table('t_unit_offices',
>     Field('f_unit', 'reference t_unit', label=T('Unit')),
>     Field('f_office', 'reference t_offices', label=T('Office')),
>     auth.signature,
>     singular="Office",
>     format= '%(f_office)s',
>     migrate=settings.migrate)
>

Above, instead of format='%(f_office)s', maybe:

format=lambda r: db.t_offices(r.f_office).f_office

Anthony

-- 

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