thanks. it's my mistake that IS_IN_DB should not work this way. since i need the field holding the name instead of the id, i'll sort out other solution for it.
-vince On Dec 30, 6:14 am, "Yarko Tymciurak" <yark...@gmail.com> wrote: > If what you want is a form which will list the names to choose from, then I > think what you want is something like this: > db.define_table('name_list', > db.Field('name') > ) > db.define_table('members', > db.Field('name',db.name_list), > ) > db.members.name.requires=IS_IN_DB(db,'name_list.id <http://name_list.name>', > '%(name)s') > > On Mon, Dec 29, 2008 at 4:08 PM, vince <lapcc...@gmail.com> wrote: > > > > this says the foreign key (a 'name_list.id') must be in the table > > name_list > > > in a string field, 'name'. > > > > This is why you get an error - you are checking a foreign key (an > > integer) > > > against a string. > > > oh so the case is IS_IN_DB allow referring via the key(id) ? > > > -vince > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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 -~----------~----~----~----~------~----~------~--~---