Infopath validating event

However, there don't appear to be any rules that validate a view or anything in the object model to execute validation rules.

Is there code that can trigger a field's validation event?

The initial submit uses code as it needs to do so using elevated privs, and further submissions need to submit back to the original library (one per user). All works fine, unless any of the validation fails.

In that case the user gets a validation error, as expected, but when they click to confirm, the form closes and they lose their work.

No, there is no gobal validation event, you can only validate each field on its own (which you could make generic, but depends on requirements).

You could however create a method that calls all field validation events before you submit the form.

In addition to validation and formatting rules, you can also add rules to form templates to perform other actions, such as switch views, set a field value, or query or submit to a data connection.

In which case I could call for the fields to be validated before trying the submit, and abort if necessary.I have been moving a bunch of infopath forms (many created in infopath 2003) to Share Point using info path 2013.One of the features of the way we have been doing forms for years is to allow the user to save their progress in filling out the form.They can also run without any conditions needing to be set. For example, you can add a rule to a button that submits the data that was entered, and then switches to a view that displays a message to confirm that the data was submitted.You can add a rule that opens a dialog box if a certain condition in the form is met.How can i prevent the validation from taking place when the user hits the cancel button?

You must have an account to comment. Please register or login here!