We have been trying to create the "Paper-less Office Environment" for almost 30 years, or have we? There are many applications in the market place that have the ability to create electronic forms and workflow them through the organization and they have existed for years. Until recently it seemed that their was a lack of will to actually implement these solutions in the enterprise, but with the dawn of the information age we are being overwhelmed with information and now we have no choice.
Even Microsoft has had a go at this with their previous release of MS Office that included Infopath 2003 and before that we had e-forms in Outlook. All of these failed for various reasons, but I think that with the advent of Infopath 2007 and Sharepoint Forms Services, Microsoft has taken a step in the right direction. Lets take a look at how it works and then you can make up your own mind.
The process starts by launching an instance of Infopath 2007.
The first dialogue box that you will see, provides you with options to create a new Infopath form, but for illustration purposes I will be using a sample template to speed up the process. It is not my intention to explain all the in's and out's of Infopath, but to explain the purpose behind Forms services in Sharepoint and where Infopath fits in. Choose the sample "Expense Report" from the list by double clicking on it.
This will then create a form with a layout already in place. It is also possible to take a MS Word document that has already been created and covert it to an Infopath form. After all, most of these documents already exist, just not in Infopath. On the right hand side if the IDE you will notice a toolbox that provides many options for building the form. In the next section of this blog I will briefly explain the purpose behind each section of the toolbox:
Layout:
| The Layout section of the toolbox is used to create the main design of the form. Like most HTML pages used on the web, we use tables to create different areas for content.
As illustrated in the screen shot on the left, there are a number of standard layouts that can be chosen, but it is also possible to build it manually from the toolbar.
In this example the layout has already been established. |
Data Source:
| The ultimate point behind an Infopath form is to capture information that will be stored in some kind of database. To facilitate this we need to connect the form to the back end database and that is what a Data Source is used for.
The data source can be connected via an Ole_DB , ODBC , XML web service or even store the data natively as XML. The best results are achieved via an XML Web service as the form will ultimately be rendered as HTML via Forms Services and then direct database connections are not supported.
Once the Data Source is established, it is a simple matter of dragging and dropping the fields onto the form. They will automatically become data bound controls to stored the data.
This example stores the data in the form as XML.
|
Controls:
| Dragging and dropping controls from the data source only creates text boxes and labels, but sometimes more advanced controls are required.
Using the control toolbox you can add date controls, checkboxes and even buttons. The buttons allow you to attached script to them written in VSTA that allow for more complex validation and workflow solutions. |
Views:
| An Infopath form is effectively and Office document that needs to conform to the standards imposed by the organization. This implies that although we might design the document to be user friendly when entering data, this is not how it's allowed to be printed.
Creating different views allows you to control different layouts of the controls depending on whether the forms is viewed on the screen or whether it is printed. |
Now that the design phase of the form is completed, it is time to upload the form to Forms Services running in Sharepoint. This is done by selecting the option called "Publish Form Template" from the toolbox.
The first thing that will happen is a request to save a local copy of the form before uploading to Sharepoint. Note the file extension of an Infopath form is XSN. After saving a local copy somewhere on your machine, a wizard will launch guiding you through the rest of the setup process:
Step 1:
The form can be uploaded to a number of locations, but the one we are interested in is "Forms Services on Sharepoint". I might just point out that you can only publish a form this way if it contains no code. If any code has been written in the form, then you need to save it to a network location and upload it into Sharepoint using the Admin Console for Sharepoint. This is purely a security mechanism.
Step 2:
The next steps requires a URL to an existing Sharepoint site where you would like to make the form available for use. This normally depends on the purpose behind the Infopath form and the site that is best suited for this purpose. Copy the URL from IE and paste it into the wizard.
Step 3:
This form will be published into a "Form Library" in Sharepoint so that users can instantiated infinite amount of copy's and store them. If you want to use the same form in multiple document library's across multiple sites in a site collection, then you need to publish it as a "Content Type".
Step 4:
Assuming that you selected "Document Library" in the previous step. The next question would be "New" or "Existing" document library. It is typically a good idea to create a separate "Forms" library" for Infopath documents as they do not fit in well with other document type in a shared library.
Step 5:
Assuming you selected "New" document library in the previous step. Provide a name and description for the forms library.
Step 6:
Document library's have columns displaying meta data about the content type's and documents stored in them. It is therefore possible to expose some of the fields in the Infopath form as meta data columns in Sharepoint by adding them to the list.
Step 7:
On the last dialogue box the only thing left to do is "Publish". If all the options have been configured correctly, then Infopath will contact Forms Services in Sharepoint and "Publish" the form into a document library.
To test that the solution worked, navigate to the Sharepoint Site in IE and refresh the page if you already had it open (This is the same URL that we provided in the wizard). You should notice a new shortcut on the "Quick Launch" bar that represents the name you chose earlier for the Document Library. Select the link and open the library.
On the menu bar of the document library, select "New". Notice that a new document template appears called "New Document" that represents the Infopath form built earlier. If you want to give a proper name to the shortcut then you will have to convert it to a "Content Type".
By default, if you have Infopath installed on you PC and you select "New" from the menu then it will open the template in Infopath. If not, then then the form will be converted to HTML by Forms Services and displayed in IE. I will illustrate both.
Once you select "New" from the menu bar, the form will open in Infopath 2007 and allow you to complete all the fields. When complete, there are two options available on the toolbar:
- Submit - this will commit the information to the data source configured during the creation of the form. At this point you can close the form without saving a copy to Sharepoint as the data has already been committed to the database.
- Save - this will save an actual copy of the form into the document library in Sharepoint. This is quite useful if you are applying workflow rules to the document library.
To illustrate the form in IE, you need to save a copy to the document library.
Navigate to the form in the document library and select the drop down arrow next to it. In the drop down menu you will find an option called "Edit in Browser". By selecting this option the form will be converted to HTML by Forms Services and displayed in the browser.
Everything that you could do in Infopath can now be done using IE without having Infopath installed on the users PC. This allows only "Forms Designers" to have Infopath installed and the rest of the user base uses IE. This was a major problem in Infopath 2003 as everyone required a copy of Infopath installed.
I hope this blog was informative and that you are starting to see where Microsoft is going with this technology.
Related Blogs:
Differences between WSS and MOSS
MOSS - Enterprise Content Management Architecture