what can I do for that? thanks in advance
On 29 jul, 09:37, web2py noob <web2py.n...@gmail.com> wrote: > On 29 jul, 09:20, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > It depends on how you insert records in familia_risiego > > with crud.create(db.familia_riesgo) > > The models are like: > > db.define_table('familia',Field('ficha','string')) > > db.define_table('riesgo',Field('nombre','string')) > > db.define_table('familia_riesgo', > Field('familia_id','string'), > Field('riesgo_id','string') > ) > > db.familia_riesgo.familia_id.requires=IS_IN_DB(db,'familia.ficha') > > # I'm tryied this, but don't work; just block the insert if riesgo_id > repeats even with a different familia_id > db.familia_riesgo.riesgo_id.requires=IS_IN_DB(db,'riesgo.nombre')),IS_NOT_IN_DB(db,'familia_riesgo.riesgo_id') > > Regards.