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 web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to