Home > Articles > Web Services > XML

Introduction to InfoPath 2010

  • Print
  • + Share This
The authors of Designing Forms for SharePoint and InfoPath: Using InfoPath Designer 2010, 2nd Edition share the story of InfoPath, a tool that helps end users interact with and share XML data.
This chapter is from the book

What Is InfoPath?

The rapid adoption of XML-based technologies over the past decade or so has precipitated the need for a tool that helps end users interact with and share XML data. On August 19, 2003, as part of the Microsoft Office System 2003, Microsoft shipped a new application created to fill that need—Microsoft Office InfoPath.

InfoPath may be one of the least known yet most appropriate platforms for gathering data in the Microsoft Office suite of applications. But InfoPath's popularity has been on a sharp rise. Anyone from an information technology (IT) manager tracking a purchase request workflow to little Johnny tracking his music collection can benefit from what InfoPath offers. Before InfoPath, programs such as Word, Excel, or Access may have been used for these tasks. There is nothing wrong with using any of these other programs to build forms. However, none of these applications were built with forms in mind, so they don't provide the ease of use and power that InfoPath has when it comes to creating a form based on XML data. The goal of this book is to make you an expert InfoPath form designer. Whether you are a novice, an information worker, an experienced developer, or anyone in between, you have found the right book to help you get the job done with InfoPath 2010.

You may be wondering why Microsoft created this new tool. Doesn't Microsoft already have other form design tools such as Word, Excel, and Visual Basic .NET, to name a few? While it is true that you can build forms with these tools, none of them are based solely on XML technologies, nor were they created exclusively to edit XML data. Both Word and Excel can interact with XML data, but they do not offer structural editing of the XML data to the extent that InfoPath does. Visual Basic .NET requires you to have at least a basic understanding of application development. InfoPath does not require you to be a developer in order to build a form. Anyone who has experience using Word can create a form in InfoPath Designer.

Thanks to the familiar Microsoft Office user interface (UI), ramp-up time to productivity is minimal. Users with little or no programming experience can use InfoPath Designer to create form templates. InfoPath Filler users can also fill out forms based on those templates. Since InfoPath was designed (no pun intended) to be used by almost anyone with little or no training, form designers have all the tools needed to deliver form templates that are easy to use. Of course, if you are a developer, you may also want to customize your form templates, for example, by writing script or managed code using InfoPath's extensive object model (OM).

Using InfoPath Designer, you can rapidly build form templates that interact with XML data and XML Schema (XSD) with little or no code required. Then users can open InfoPath Filler to fill out forms based on the form templates you created. Because InfoPath is a Microsoft Office product, the UI is as familiar to users as Word. In fact, InfoPath provides a lot of the same features as Word (e.g., spell checking, rich text editing), so filling out forms in InfoPath is as easy as drafting a document in Word. The main difference is that when users are filling out an InfoPath form, they are actually editing XML data.

However, the value of InfoPath goes way beyond its ability to edit XML data directly. In fact, its usefulness as a data-gathering and management tool is one of the most powerful aspects of InfoPath. Also, because the InfoPath form templates you create can be based on industry-standard XML Schemas and integrated with Web services, data stored in InfoPath forms can be integrated with existing processes in your organization and across other organizations.

Let's look at an example. Say that you run a sales organization. You have an existing database that contains customer and sales data. Your sales manager wants you to create two different forms—one for salespeople to input customer information and another for them to input sales data. Before InfoPath, there were many ways to create these forms. However, since the data comes from a back-end database, all of these methods involved writing some code. And you would typically have to duplicate this code from one form to the next.

With InfoPath, creating these forms is much easier. InfoPath allows you to create form templates that connect to existing databases or Web services, thus removing the need to write code to access the data. This part is done for you. InfoPath also allows you to easily merge the data gathered in these forms so that you can create aggregate reports for upper management. Again, InfoPath enables you to do this without writing any code at all, unlike other form tools. InfoPath includes an extensive OM, so it's highly customizable. Using InfoPath, you can enable almost any data collection scenario you can dream up. The scenarios can be extended by combining InfoPath with SharePoint workflows to rapidly develop applications to automate business processes in the enterprise. Deeper integration with SharePoint is a key development point in the latest release, which makes it easier to link your data collection forms to the processes they drive.

As your business needs change, so should your software. InfoPath is designed to cater to these ever-changing data collection needs. Built on World Wide Web Consortium (W3C) standards, XML and its associated technologies help InfoPath deliver on its promises. A few of the greater benefits of XML include the following:

  • Provides a semistructured data format
  • Is human readable
  • Is easy for programs to process
  • Works across disparate systems

Technologies encompassing XML include Extensible Stylesheet Language Transformations (XSLT) for transforming the XML to another format such as HTML, XML Path Language (XPath) for selecting specific parts of the XML data for processing, and XSD for defining precise rules for how the XML structure and data should look. InfoPath seamlessly incorporates each of these technologies into the experience of designing and filling out forms. For example, thanks to XSLT, one of the most important benefits of using InfoPath is the ability to separate data from how it is displayed. With the drag-and-drop UI of the InfoPath Designer, you can completely change the look-and-feel of a form without changing the underlying data that is saved when a user fills it out. Another advantage is being able to merge data from multiple forms. This is especially useful when creating a report, for example.

As we mentioned, InfoPath offers a plethora of built-in features geared toward collecting data that would require custom code in other form design tools. With InfoPath, for example, you can use data validation and conditional formatting to ensure that users enter valid data before the form is submitted to your back-end databases or Web services. You can also design your forms to collect only the data you need. Traditional forms include many parts that don't apply to everyone. For example, employment applications often contain sections relevant only to people with college degrees. However, these forms have to include sections for this information since the forms are static by nature. These forms may contain instructional text such as "If you chose Yes for question 5, please enter more information here. Otherwise, skip to question 6." With InfoPath, you can design dynamic forms that contain the additional sections only if needed. Using our example, when a user chooses Yes to question 5, a section of the form that wasn't visible suddenly becomes available. Also, the static employment application may not provide enough room to fill in a complete employment history. In this case, users must either not include the additional information or provide it on an additional form. With InfoPath forms, your users can fill in as much data as they need since your forms can be built to grow dynamically. When your users need more space to fill in additional data, the form can expand to meet their requirements.

These are just a few aspects of InfoPath that makes it a more powerful tool for XML-based forms than other applications. We will talk about these benefits and more throughout this book. First, however, we'd like to give you an overview of the evolution of InfoPath through four successive versions—InfoPath 2003, InfoPath 2003 Service Pack 1, InfoPath 2007, and InfoPath 2010. This will not only give you some insight into the product's background but also introduce you to several of its features.

  • + Share This
  • 🔖 Save To Your Account