Hi: I am having the same problem. My form has three different views depending upon which data connection is being used and what stage in the work flow the form is at. I use custom Rules for each stage that determine the visibility and condition of many different elements on the form rather than Infopath 'Views'. The three custom views are as follows:
-
one for a NEW form,
-
a second -- SENT -- after the form has been submitted to the first data connection,
-
and a third -- COMPLETED -- when the form is returned via the second data connection.
I've tried to catch all the validation errors before invoking the "submit" rule. Then, just prior to invoking "submit", I change the text of the invisible "Status" field from "New" to "Sent." So far so good. The view won't change if any of my custom validation rules throws an error, allowing the user to fix any errors in the "New" view, and then re-submit the form.
HOWEVER, I haven't been able to figure out how to catch any generic errors during the "Submit process", such as the error that is generated if the user hits "Cancel". By that point, the Submit field has already changed to "Sent" and the view of the form is irrevocably changed.
I cannot use roles, because the recipient's of the first stage are outside our server domain. I tried to include a button to revert to the former view (New), but that button should be disabled and invisible to the recipients of the "Sent" view, which I can't do if I can't catch the generic validation error. Catch 22.
Can anybody help?
N.C. Gordon.
Noel C. Gordon