Hi David,

This is the relevant part of the model file, table definition:
db.define_table('company',
    Field('name',length=54,default='',notnull=True),
    Field('CoC_number',length=8),
    Field('subdossiernumber',length=4,default='0000'),
    ...
    Field(...),
    migrate=False)

... and the validator that's causing the problem:

db.company.CoC_number.requires=IS_NOT_IN_DB(db(db.company.subdossiernumber==request.vars.subdossiernumber),db.company.CoC_number,error_message='combination
of CoC-number and subdossiernumber already in database')


> Seems strange that you are creating a form for a real table by using
> SQLFORM.factory. Why do that, rather than create a normal form?

Because I want to use one form to update multiple tables, and from the
web2py manual: 
http://www.web2py.com/book/default/chapter/07#One-form-for-multiple-tables
I learned to use form=SQLFORM.formfactory(...) for that purpose.

If there's another solution for having one form to update multiple
tables, please let me know.


Kind regards,

Annet.

Reply via email to