Do not know whitout lookig at models but try replace db.docs_pages_ver.category.requires=IS_NULL_OR(IS_IN_DB (db,'docs_categories.id','docs_categories.name',error_message="..."))
with db.docs_pages_ver.category.requires=IS_NULL_OR(IS_IN_DB (db,'docs_categories.id','%(id)s',error_message="...")) then try replace %(id)s with %(name)s On Nov 17, 3:14 pm, pigmej <[EMAIL PROTECTED]> wrote: > Controler: > > def test(): > values=db(db.docs_pages_ver.id==47).select()[0] > return SQLFORM(db.docs_pages_ver,values,showid = False) > > model: > db.docs_pages_ver.category.requires=IS_NULL_OR(IS_IN_DB > (db,'docs_categories.id','docs_categories.name',error_message="...")) > db.docs_pages_ver.author.requires=IS_IN_DB > (db,'users.id','users.nick',error_message="...") > db.docs_pages_ver.parrent.requires=IS_NULL_OR(IS_IN_DB > (db,'docs_pages.id','docs_pages.title',error_message="...")) > ... > > And in output everything is ok except category field. All fields are > selected correctly, except this one. > In category field there is nothing selected. There are the same kind > of relations etc. > > I have no idea what's wrong > > Btw. > > return values.category returns an correct integer ( it exists in > db.category.id ) > > Any ideas ? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---