Friday, August 31, 2012

BPA and Error Handling in InfoPath 2010 Forms

BPA and Error Handling in InfoPath 2010 Forms
Business Process Automation (BPA) with SharePoint and InfoPath includes subtle caveats such as “Error Handling” when warning users of application errors when a field needs to be populated.   Microsoft has placed some defaults within the application that are a bit obscure and sometimes inconsistent with the actual error that is occurring.  In this very brief post, I wanted to give you the idea of creating a new warning by using rules in an InfoPath 2010 form without using the default Microsoft message error message. 
Scenario:  Typically, when a form is created  in InfoPath, many of the fields may be mandatory or required to be populated.  The problem occurs when the message provided is not complete or informative enough for the users to understand what steps need to be taken.  The typical message resembles the following:
Fig 1.0

Some of my associates in the SharePoint realm have used and set policies for organizations using rules to make messages more consistent for all SharePoint developers. Instead of providing error messages like the above, create rules that will display messages that are relevant to the given field of error. In the following example both the “Title” and the “Company” are mandatory fields.
Fig 2.0

If these fields are not populated then the user will receive error messages like the following:
Fig 3.0

By Adding rules to the submit button the default error message in InfoPath 2010 can be avoided.
Example of Rules that were applied:
Fig 4.0
By limiting your user group's exposure to erronious error messages, there will be less user frustration, and they will be more likely to embrace the benefits of your solution. 

No comments:

Post a Comment