I have a table which combines companies with activities and I have
a table called timetable for scheduled activities:
db.define_table('company_activity,
Field('company,db.company),
Field('activity',db.activity),
migrate=False)
db.define_table('timetable',
Field('company',db.company),
Field('activity'),
Field('day',db.day),
Field('time',type='time'),
Field('duration'),
Field('level',db.level),
migrate=False)
To prevent the user from entering an activity in timetable and to not
confront him
with an endless list of activities he doesn't offer, I would like to
vailidate timetable.activity
using a dropbox with options based on the company_activity and
activity tables.
The query would read like:
db((db.company_activity.bedrijf==auth.user.bedrijf)&
(db.company_activity.activity==db.activity.id))
.select(db.activity.activity)
The key and value in the dropbox should have the value of
db.activity.activity. Does one of
you know how to implement this?
Kind regards,
Annet
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---