On Tuesday, October 9, 2012 8:14:54 PM UTC+3:30, Annet wrote:
>
> In a function I have the following code:
>
> validate(form):
organization=db((db.
>
> organization.cocNumber==form.vars.cocNumber)&\
>
> (db.organization.subdossierNumber==form.vars.subdossierNumber)).select(db.organization.ALL)
if organization:
form.error.exist = 'Y'
> form=SQLFORM.factory(...)
>
if form.process(keepvalues=True,onvalidation=validate).accepted:
>
processForm(form)
else:
form.process(keepvalues=True).accepted:
processthisone(form)
return dict(form=form)
>
> The problem is that some organizations do have the same coc_number and
> subdossier_number but differ in name and address, so after the warning
> flash I'd like to be able to submit the form again and just call
> processForm(form) so without checking whether the database contains the
> organization or not.
>
> What is the best way to code this?
>
>
> Kind regards,
>
> Annet.
>
>
--