Massimo,

Thanks for your reply. I tried:

form=SQLFORM.factory(...)
if form.process(keepvalues=True).accepted:
    organization=db((db.organization.cocNumber==form.vars.cocNumber)&\
    
(db.organization.subdossierNumber==form.vars.subdossierNumber)).select(db.organization.ALL,cache=(cache.ram,3600))
    if organization:
        response.flash='The database already contains an organization with 
this coc_number and subdossier_number'
    else:
        processForm(form)
elif form.errors:
    response.flash=responseFlash('formerror',session)
elif not response.flash:
    response.flash=responseFlash('form',session)
return dict(form=form)

... but that doesn't work, when I submit the form and the database already 
contains an organization with the same coc_number and subdossier_number, 
the flash 'The database already contains an organization with this 
coc_number and subdossier_number' displays and the form keeps its values, 
however, when I submit the form again, I get the same flash and the form 
isn't being processed.


Kind regards,

Annet. 

-- 



Reply via email to