this works for me: db.plano_aplicacao.codigo.represent= lambda codigo: db.natureza_despesa[codigo].codigo + ' - ' + db.natureza_despesa[codigo].especificacao ),
2010/1/13 Miguel Lopes <[email protected]> > I have the following tables: task, opportunity, and oppty_main > With the following relations: > * task.opportunity_id->opportunity.id > * opportunity.oppty_main_id->oppty_main.id > > When updating a task I have a SELECT for the related opportunities: > > db.task.opportunity_id.requires=IS_NULL_OR( > IS_IN_DB(db(db.opportunity.id==db.task.opportunity_id), > 'opportunity.id')) > > The problem is how to get the representation to show the name of the > opportunity, which is at oppty_main.name! > Something like (doesn't work): > db.task.opportunity_id.requires=IS_NULL_OR( > IS_IN_DB(db(db.opportunity.id==db.task.opportunity_id), > 'opportunity.id', > '%(db.task.opportunity_id.oppty_main_id.name)s') > > Miguel > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<web2py%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > > > -- Atenciosamente -- ========================= Alexandre Andrade Hipercenter.com--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

