Microsoft introduced several changes in Office 2003 Service Pack 1 for InfoPath including new database integration capabilities, better security, enhanced digital signing, Visual Studio .NET 2003 integration, and much more. This article offers an overview of the SP1 improvements that are specific to InfoPath.
The first and most obvious difference introduced by SP1 for InfoPath is the Fill Out A Form dialog box. This dialog box (Figure A) appears when you start InfoPath and takes the place of the Fill Out A Form task pane in the original release. Like its predecessor, the Fill Out A Form dialog box lets you create a new form or open an existing one. However, it also organizes forms by categories including Recently Used Forms, Favorites, All Forms, and Sample Forms. After you select a form you can choose an action for the form such as fill it out, design it, add it to the Favorites list, and so on.
|The Fill Out A Form dialog box replaces the Fill Out A Form task pane at InfoPath startup.|
New and improved controls
Most forms rely on a range of controls such as text boxes, drop-down lists, buttons, and so on to accept input from the user and display information in the form. SP1 introduces several new controls and improves on some of the controls in the initial release.
When you open the Controls task pane, the most obvious difference is the categorization of controls. Pre-SP1 InfoPath lists all of the controls together; SP1 organizes the controls into Standard, Repeating and Optional, File and Picture, Advanced, and Custom categories (Figure B). This organization makes it much easier to find specific controls.
|InfoPath SP1 does a better job of organizing the available controls.|
New in the Repeating and Optional category is the Master/Detail control. When the form user selects an item from the master control, the detail information about the item appears in the detail control. Using the Northwinds sample Microsoft Access database as an example, you might create a form that displays suppliers in the master control and products in the details control.
The File Attachment control is also new. This control makes it easy for form developers to add the capability for form users to attach files to a form. For example, you might create a form for submitting expense reports or other documents. The form requires no coding. Just drag it to the form and set a few properties. For example, you can restrict the types of documents that can be attached, specify a default file, and specify rules that fire when the user attaches a file. In the form, the user only needs to click the control and InfoPath opens the Attach File dialog box, which enables the form user to select the file to attach to the form.
The Choice Group control provides a means to offer a different set of data to the form user based on his selection. For example, you might pull two different shipping addresses from a database and let the user choose which one to use. In this example, you bind the data in each group to the appropriate field or fields in the database. Then, when filling out the form, the user clicks the button in the upper left corner of the group and chooses Replace with <field name>, where <field name> is the name you've assigned in the form to that choice group.
The Scrolling Region is another new control introduced by SP1 that integrates a scroll bar with a text box (Figure C). This control lets you display a large amount of text data in a fixed, confined area on the form. For example, you might use a scrolling region to display a description for a part or product or provide instructions for filling out the form.
|This scrolling region displays notes on the form in a confined area.|
Next comes the Repeating Recursive Section control. You can insert this control within itself and bind it to nested reference fields. This repeating control is handy for hierarchical, repeating elements like outlines.
Vertical labels, another new control type introduced in SP1, are just what you might expect—a text label that reads vertically from top to bottom. Unfortunately, there appears to be no way to change the orientation of the label to read from bottom to top, limiting the control's usefulness.
SP1 also introduces some improvements for existing InfoPath controls. For example, you can now edit multiple controls simultaneously, align the text in a control with the surrounding text, limit characters or enable paragraph breaks in text boxes, and use values from the form to populate list boxes.
More data enhancements
InfoPath with SP1 makes it easier to work with data in the form. For example, SP1 enables you to perform calculations, reference other form fields, display dates and times, and perform selected string operations without writing any script for the form.
Filters and data validation are also significantly improved in SP1. For example, you can use the selection in one list box to set the values available in a secondary list box and also filter data inside repeating tables. SP1 also makes it possible to specify data validation requirements for form controls. You can also use data entry patterns to force the user to enter data in a specific format. A single field can support multiple data validation alerts.
Conditional formatting lets you control the visibility and read-only status of controls on the form based on value of other controls on the form. Conditional formatting extends to a broad range of controls including buttons, check boxes, date pickers, and others. In addition, SP1 also provides support for rules that automatically perform tasks based on events and values in the form. The use of rules limits or eliminates the need to write script to accomplish these tasks.
In addition, forms created with SP1 now support text in Indic, South Asian, and right-to-left languages.
As I pointed out in a recent article on integrating databases with InfoPath forms, the original release of InfoPath supports data submission only to the primary database you designated when you created the form. SP1 removes that limitation and allows you to bind controls to secondary data sources and submit data to those secondary sources. However, the restriction to submit to a data source containing a long data type still exists in SP1.
SP1 introduces other improvements for Web services and Windows SharePoint integration. For example, you can easily receive and submit data to Web services that use ADO .NET DataSets. The Windows SharePoint Services library or list data connection helps you build forms that receive data from a SharePoint form library or list. You can also create data connections that enable the form to submit data to a SharePoint form library.
Submission options are also improved in SP1. For example, a user can choose File, Submit to submit a form as an email attachment. You can define the recipient, subject, and file attachment name based on static values set in script or in the form, or through values of controls in the form. You can design the form to submit only specific fields or groups, the contents of specific fields or groups, or the entire form to a Web service. SP1 enables submission of form data as a string, which makes it possible to submit digitally signed data. Finally, you can design the form to submit to multiple locations. For example, part of the form might be submitted by email while other portions are submitted to a Web service.
Microsoft Visual Studio .NET 2003 integration
Microsoft has released the Microsoft Office InfoPath 2003 Toolkit for Visual Studio .NET, which enables developers to create, debug, and build InfoPath forms that use Microsoft Visual C# or Microsoft Visual Basic .NET managed code. You'll find the free toolkit at Microsoft's Web site.
Layout and printing improvements
SP1 expands on several features to simplify form layout, design, and printing. You have much better flexibility for formatting fonts and paragraphs and setting font size, paragraph indentation and spacing, and other properties. The Format Painter tool makes it easy to copy formatting from one block of text or paragraph to another, just as it does in other applications such as Word. You can specify the font and other characteristics for form headers and footers, easily insert symbols into the form using the Symbol dialog box, and draw complex tables with varying cell heights or varying columns per row using the new table drawing tool.
For printing, SP1 lets you define more printing options for the form's end user, including such properties as the number of copies, collation, print range, printer name, page margins, paper size, paper source, and page breaks. A new page width guide lets you see whether the contents of a form will fit on a printed page. You can also use XML to create and assign print views for printing from Microsoft Word.
Other enhancements and new features
You'll find some additional new features and enhancements in InfoPath SP1 for security, interoperability, and ease of development. On the security and business integration front, InfoPath now supports multiple digital signatures per form. The user can sign specific sets of data in the form, view how the form appeared when it was signed, and add comments to their digital signatures. Forms can be co-signed or counter-signed.
Form designers can also integrate user roles into forms and cause the form to behave differently depending on the role of the current user. For example, managers would have different capabilities when reviewing a form from a user who filled out the form. Roles enable the developer to target the appearance and function of the form to the business practice behind the form. To further support business practice integration, InfoPath form designers can integrate Human Workflow Services (HWS) actions into forms. HWS is a component included with Microsoft BizTalk Server 2004, which enables companies to build B2B solutions. Users can interact with the HWS actions through the new Workflow task pane in InfoPath.
InfoPath SP1 extends support for the Tablet PC, as well. Users can write directly in forms and InfoPath converts the electronic ink into typed text. Some controls support inking, enabling you to add handwritten notes and drawings to a form. You can also set the background picture for ink picture controls.
To help provide compatibility for users who do not have SP1 installed, you can enable or disable the SP1 features, even if SP1 is installed on a given computer. In addition, you can also restrict access to certain toolbars and menu commands such as Save, Export To, and Print to control the actions a user can take with a form.