InfoPath, SharePoint and Business Processes – Part 2
Posted by Kevin Coetzee | Posted in General, InfoPath 2007, Sharepoint 2007 | Posted on 03-09-2009
3
Part 2 – The Conversion
In Part 1 of the series we really spoke about the process of wanting a simple way of implementing a Business Process such as the Leave process. In this part we’ll start by converting the already designed Leave form which is in word into an InfoPath form. We’ll also talk through the InfoPath environment and how from a Business User perspective, you can make a form fairly dynamic. We’ll also show some integration of InfoPath and SharePoint as a datasource. As per my Tech-Ed session, my main focus in this part is on the Business User, so I’ll do everything without coding. In a later part I’ll include items such as reading from Active Directory..etc.
So let’s begin…..
From Paper to Paperless……
So perhaps as an into this section, let’s first review what InfoPath is. Even though InfoPath is part of the Office suite, it is surprising how few people are actually using it or even know of it. One description of InfoPath is a short one sentence answer would be: you use InfoPath to both design and fill out electronic forms. You can read more about it here (http://office.microsoft.com/en-us/infopath/HA101635771033.aspx)
So by selecting InfoPath from your Microsoft Office Menu item, we are presented with a “Getting Started” wizard. At this point we have a number of options. We could either open up an existing form, you can design a new form from “scratch”. For the purpose of this part we’re going to use the “Import a Form” option (Alternatively you can also find it on “FILE”, “IMPORT A FORM”)

Once you clicked “Import a Form” you’re presented with the type import screen (represented below). When I initially saw this screen, I really thought “How ‘Doff’ are the Microsoft developers, creating this huge white space (the block) to house only two items, namely Import Excel and Import Word.” Then I realized that I was really the ‘Doff’ one. The Import Excel and Import Word are really the default items that come with InfoPath but if you notice at the bottom of the screen, there is a “Search for Form template converters on Office Marketplace”, where a wide range of other import options are available to you (e.g. import PDF…cool). So for our example, I’m going to choose, importer for Word Documents.

Once you’ve browsed and selected your WORD document, click Finish for the Magic to begin…

Once complete it gives either a “thumbs up” or “thumbs down”. Most of which you can fix in the designer

The End result is very impressive…

So let’s talk about what it has done.
Firstly, you’ll notice that is has grouped Items into ‘Tables’. This is indicated by the ——- blocks around everything. ‘Tables’ are great for laying out items on my form and to keep things looking good especially when I create a web form from this. Over all I think InfoPath has done fairly respectable job of converting my WORD document. (Imagine trying to do this from scratch, it would of probably taken awhile). It has also done some fairly smart when we look at the text boxes it creates. It bases the textbox name on the text, it only removes the spaces….now that’s cool…

Ok now that I’ve got my basic form without doing much work. Let’s clean up the form to already give me more functionality than the WORD document had. First of all we want to make the Employee name, surname and ID Number compulsory. You do this, very simply, by selecting the “Cannot be Blank” checkbox in the properties window. (You get to properties by double clicking on the textbox or by right clicking on it and selecting properties)

Then we want to make the selection of Position easier. So we add a drop down box for selection. To do that we turn our attention to the right of the InfoPath Application

This Panel, has pretty much everything you may require. So to add a drop down, we select “Controls”. And we select “Drop-Down List Box” 
Now you can either double click or drag and drop to get it on to the canvas. But there is a little trick which you can use. If you simple right click on the textbox that was created for you, there is an option to use the “change to” function which will conveniently keep the name and properties. So I choose Drop-Down List Box.

Now if I double click on the drop down the properties come up and I can add my various options in. Which makes my selection easier.

The next item we need to change is the check boxes. Now the issue is that checkboxes, allow you to choose multiple items at the same time. So we need to change the items to option boxes. We can’t though select each checkbox and then use the “change to” because this will still keep them as individual options that can be selected at the same time. So what we have to do is select all the checkboxes at the same time using the CTRL click. Then we can use the change to.

Moving now down to the First and Last Day of the leave. These need to selection dates. So we’re going to the “change to” option again, to change to date pickers. One of the ‘gotchas’ is the data type that is created. Because this originally was a textbox the type will remain “text”, so don’t forget to change to “date” data format on the properties window.

Finally we can now make the address field a multi-line entry field.

Now if we click preview – we have a fairly decent form. With basic validation and checks. In the next part, Part 3, we’ll explore some more advanced components, such as automatically picking up the username that logged in, inserting a message as to who the approval will go to as a message on the form and an automatic calculation on the number of days you want to take leave for while at the same time checking holidays and weekends.
Ok so see you on the other side in Part 3…..


[...] InfoPath, SharePoint and Business Processes – Part 2 (Sticky Glue)In Part 1 of the series we really spoke about the process of wanting a simple way of implementing a Business Process such as the Leave process. In this part we’ll start by converting the already designed Leave form which is in word into an InfoPath form. We’ll also talk through the InfoPath environment and how from a Business User perspective, you can make a form fairly dynamic. We’ll also show some integration of InfoPath and SharePoint as a datasource. As per my Tech-Ed session, my main focus in this part is on the Business User, so I’ll do everything without coding. In a later part I’ll include items such as reading from Active Directory…etc. [...]
Hello from Russia!
Can I quote a post in your blog with the link to you?
The instructions and procedures you shared are easy to follow and precise. I will be recommending this site of yours. Thank you for sharing and walking me through.