I do not understand the question. The code below looks correct but perhaps you want to add
db.events.contact.requires=IS_IN_DB(db,'person.id','%(first_name)s % (last_name)s') On Sep 7, 8:48 pm, jayvandal <jayvan...@gmail.com> wrote: > Hi, I have an events table. I have a field to lookup on a person table > (field 1) > Then I want to do a lookup on the same person table to find a contact > (field 3) > I thought I could do this , but failed so I looked for an alias for > the person table > Any suggesions? > Jim > > ============================================================= > db.define_table('events', > Field('person',db.person), > Field('description',length=128), > Field('category',db.category), > Field('contact',db.person), > Field('start_date',length=10, requires=IS_NULL_OR(IS_DATE()), > comment='Example ex: 1975-09-20'), > Field('end_date',length=10, requires=IS_NULL_OR(IS_DATE()), > comment='Example ex: 1975-09-20'), > Field('address',length=128), > Field('city',length=128), > Field('states',db.states), > Field('country',length=128), > Field('zipcode',length=9), > Field('amount','integer')) > db.events.person.requires=IS_IN_DB(db,'person.id','person.last_name') > db.events.states.requires=IS_IN_DB(db,'states.id','states.state_name') > db.events.category.requires=IS_IN_DB > (db,'category.id','category.category_name') --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@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 -~----------~----~----~----~------~----~------~--~---