Massimo, > (db.companyactivity.activity==request.vars.activity) > > the left hand side a reference field or an int and the right hand side > is a string. Hard to follow ...
I apologize for that. The combination table reads like: db.define_table('companyactivity', Field ('company',db.company,default='',notnull=True,ondelete='CASCADE', writable=False, readable=False), Field ('activity',db.activity,default='',notnull=True,ondelete='RESTRICT'), Field('created_on',type='datetime', writable=False, readable=False), Field('modified_on',type='datetime', writable=False, readable=False), migrate='companyactivity.table') db.companyactivity.company.requires=[IS_IN_DB(db,db.company.id,'% (companyname)s'),IS_NOT_IN_DB(db (db.companyactivity.activity==request.vars.activity),db.companyactivity.company,error_message='already in database')] db.companyactivity.activity.requires=IS_IN_DB(db,db.activiteit.id,'% (activiteit)s') So company and activity are both of type int. > db.timetable.activity.requires=IS_IN_SET([row.activity for row in > activity]) > > should be > > db.timetable.activity.requires=IS_IN_SET([row.id for row in activity], > [row.activity for row in activity]) I changed my code to read like the code above, but I still get the same error ticket. 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 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.