InfoPath 2003 is one of the new additions to the Microsoft Office 2003 system that provides a dynamic forms based environment that allows business data to be collected and managed in XML without requiring end user knowledge of XML. Since the native format for data storage in InfoPath is XML, the information gathered using InfoPath forms can be very easily integrated with virtually any backend system that can understand and work with XML. InfoPath also allows the organizations to easily create rich and dynamic forms using the WYSIWYG interface that supports features such as offline editing, rich formatting, spell checking and so on. In this two-part article series, we will demonstrate the features of this new tool by looking at the InfoPath forms environment. We will also understand how to create dynamic data-bound InfoPath forms by leveraging external data sources such as SQL Server, and an ASP.NET XML Web Services.
InfoPath is designed to solve a core problem in data collection and integration needs in the enterprise via XML. Despite XML's potential to enable application integration, its use typically requires a development background that involves typically XML and XSL. Because of this, it is primarily employed in back-office and data center applications. But now with InfoPath, you can bring the XML functionality to the desktop by allowing users to gather and manage business data in XML without requiring those users to know the language themselves. By providing native XML support, InfoPath allows customers to more readily reuse the information created through their business processes. For example, InfoPath can be used by the line of business (LOB) applications to bring the power of back-end systems and applications such as Customer Relationship Management (CRM), Enterprise Resource Planning (ERP), and Supply Chain Management (SCM), to every desktop. On a team level, InfoPath may be used to address such tasks as weekly status reports, sales call tracking and so on. Because of its seamless integration with other Office family products such as Excel, Outlook, and Windows SharePoint Services, you can readily share business data with your team members.
Architecture of InfoPath 2003
InfoPath's form design interface includes familiar controls, such as check boxes, date pickers, and text boxes. You can create forms by dragging these elements into a document editor that provides WYSIWYG view of the form, and traditional text editing and layout facilities are available to arrange and format the form elements. You can get most of these functionalities without having to write a single line of code even though a script editor is available if you wish to add more complex functionality.
When you are designing a form using InfoPath, you have two options.
- You can use one of the built-in sample templates provided by Microsoft for performing common tasks such as asset tracking, expense reports, project plans, and sales reports. These templates are fully functional, and can be used directly, or they can be customized to meet the needs of the user.
- Or you can design a form from scratch and add all your custom functionalities.
Data entered by users in InfoPath forms is stored in XML. InfoPath also provides out-of-the-box support for Web services protocols, including Simple Object Access Protocol (SOAP), Universal Description, Discovery, and Integration (UDDI), and Web Services Description Language (WSDL), making it an ideal client for Web services. You also have full control over the XML schemas used in this process, and you can bind form data controls to XML data elements by simply selecting them from a list.
Operations that can be performed using InfoPath
There are two main operations that you can do with InfoPath.
- Designing form templates — You can design InfoPath forms using the WYSIWYG editor that can be based on XSD Schemas or WSDL.
- Filling out forms — In this operation, when the user browses to a form template and InfoPath opens a form template allowing the user to fill out the form.
For both of these tasks, you need InfoPath to be installed and available in the client machine.
Designing an InfoPath Form Template
When you design a new form template, you can either start from scratch by selecting New Blank Form or base it on an existing data source by selecting New from Data Source. The task pane (available in the right hand side of a blank form) provides links to the various tasks you might want to perform while designing a new form. Specifically, you'll want to control the form layout, place controls on the form for capturing different types of information, define how those controls map to your underlying data source, define different data views of the form, publish it and so on. After selecting New Blank Form, InfoPath provides a blank design surface in which you can drag and drop controls onto. As you're designing a form, you can select Preview Form to see what it will look like when the user fills it out.
As you design a form from scratch, InfoPath automatically builds an XML Schema definition behind the scenes to represent the information that will be captured by your form. If you fill out an InfoPath form and save it to disk, InfoPath will produce an XML document that conforms to the schema. InfoPath also provides an advanced feature that enables optional and repeating sections. Optional sections can be hidden and displayed on demand, making it possible to simplify forms and decrease clutter. Repeating sections let you repeat blocks of information that occur multiple times in a schema. InfoPath also enables you to bind repeating controls to external data sources for automatic population of the control.
Page 1 of 3