425-882-1032 info@3sharp.com

Recently, I have touted how the 2007 Microsoft Office release simplifies the overall development effort for end-to-end solutions. Currently, I have been developing different variations of a building permit application solution, for which I promised in my last post to share some details. In this post, I will provide an overview of that solution and highlight one key feature: the “design once” concept of Microsoft Office InfoPath 2007.

The solution allows residents and business owners of the city of Anytown, MI, access to a public site to complete a building permit application. This application is a browser-based InfoPath form that captures specific data about a building project. Once all data for the building project has been entered, the applicant submits the data to an internal SharePoint document library. There is a workflow—designed using Microsoft Office SharePoint Designer 2007—that is associated with that library and is triggered when a new item is added. The workflow evaluates data in the InfoPath form and sends an e-mail message to an Anytown compliance reviewer, who must determine if the project meets certain requirements (for example, fire safety regulations). The compliance reviewer uses the InfoPath client to determine if these requirements have been met or not and then submits the form back to the same SharePoint document library, which results in the workflow again being triggered. If all requirements in the form have been met, an e-mail message is sent to the applicant indicating that the application has been approved and that a specific permit amount is due. Otherwise, a different e-mail message with a hyperlink to the form is sent to the applicant, who must then make changes to the form and re-submit the data to start the review process again.

In the description of this solution, note that the form is accessed from both the browser and InfoPath client, depending on the role of the user viewing the data. These different entry points might suggest that multiple form templates are used in the solution. However, with Office InfoPath 2007, you design your form template once to support both browser and client scenarios. If you have an existing form template that is designed only for the client, enabling browser support can be done in a few easy steps. Simply select Tools | Form Options and then click the Compatibility category. Select the option to Design a form template that can be opened in a browser or InfoPath, as shown in the following figure:

Enabling Browser Support

There are certain features (for example, user roles) that are not supported in browser forms, so you should use the InfoPath Design Checker to ensure there are no compatibility errors. You can access the Design Checker by selecting View | Design Tasks and then clicking Design Checker. Errors and warnings will be displayed in the task pane as shown in the following figure:

Using the Design Checker

Because the user role feature is not supported in browser scenarios, it is necessary to add logic to the building permit application form template that identifies whether the current user is an applicant or compliance reviewer. In my next post about this solution, I will explain how the RoleID node serves that purpose.