Tuesday, November 22, 2011

Multiple views in InfoPath 2010 forms

I have not used InfoPath much before until recently when I was asked to proof-of-concept (POC) a approval form in SharePoint. So I explored SharePoint 2010 for providing storage and routing engine (workflow) and InfoPath 2010 for designing the form.  Contrary to my initial expectation, I was actually pleasantly surprised with what I learned about InfoPath 2010. There are a few cool features that I find very useful for form designing. One of them is Views.

We can create multiple views for the same form. In my case, I created a form submitter view, approver view, add approver view and Watcher view. The first 3 are self-explanatory. The Watcher view is a read-only and will be activated when the form has been fully approved or being viewed by persons other than the original form submitter or approvers.

To create a view, you have to click on the Page Design tab and click New View. Once, the views are created, we can use the rules to activate them accordingly. In my case, I created rules during form load. To get there, Click on the Data tab and choose Form Load. On the Rules window, create rules and add conditions and actions ( = switch views).

In this example, Submitter view will be activated/shown when the current user is the form submitter. By the way, you can also switch to another view based on a button click.



Have fun with InfoPath 2010 !!.

1 comment: