IP2007 : Custom Save Button (avoid validation rules)

H

hurtlingturtle

Hi,
I am using Infopath 2007 beta2 and need to have multiple buttons which
may or may not submit the data to the Sharepoint workflow and also
perform appropriate validation or not. What I need is for some of
these buttons to ignore all validation rules eg: when they press a hold
button which means that they have not finished entering the data.
Since my form is huge and based on an agreed XML Schema I do not want
to alter all of the validation rules to include a check against a new
field.

Surely there is a way in Infopath 2007 to plug into the standard save
functionality which as far as I can see completely avoids all
validation, as well as rather handily avoiding triggering the
underlying workflow.
oh yeah, also when I press my hold(save) button I need to set some xml
field values, so I can't just train users to use the standard save
button as diff "save" buttons will set diff field values.

any cunning ideas?
thanks very much
cheers
Bruce
 
H

hurtlingturtle

Hi All,
Well, I've continued investigating this further and my findings are as
follows.....

1. When concatenating fields using rules you cannot put in newlines,
you can only do this through code
2. You cannot have both code on a button click event and also have a
"close the form" rule on the same button, this in IP client stops the
code from executing; but in forms server it makes the web page get
stuck and displays a msg saying "Form Closed" and at the same time a
looping message saying "Form Loading".... weird...
3. It is possible to trigger a submit from code, but not a save or
close form
4. You can clear the errors buffer and therefore remove all validation
errors from a form through code

Based on the above findings the only (watch out this gets nasty)....
way that I can see to implement a custom submit button which ignores
validation is as follows.....
1. Create your button that executes your code and clears the errors on
a view
2. Make this button also through code switch to another view eg: one
called say "Closure"
3. On this new view have a nice big button called "Close me now" (with
a rule to close the form), and the user clicks this to close the form.

this is an extremely nasty and non-user friendly solution, please
please please can someone help me find a solution that works and is
nice and friendly to the user???
Surely Infopath is better than this???

thankyou very very much
cheers
Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top