The InfoPath Interface


InfoPath provides two modes of operation, form fill in and form design mode. Regardless of the mode that InfoPath is in, the user interface is divided into two sections, as shown in Figure 2.1. The first is the form area, a large open area on the left-hand side of the workspace. When an InfoPath solution is open , this area contains the data form that is being either designed or filled in. As a form is filled in or designed, this area provides the results of the actions performed from the menu, toolbar, or task pane; this area is also where InfoPath users tend to spend the majority of their time. During runtime (form fill-in mode), this area acts as the data entry surface and provides immediate feedback for any type of data entry validation errors.

click to expand
Figure 2.1: The InfoPath interface is divided into two sections.

The second area is the task pane. The task pane is by default located on the right-hand side of the form but can be repositioned, resized, and even closed according to the user s Office preferences. The task pane is designed to contain InfoPath commands like spell check, text formatting, or design tasks. In addition, developers can extend the task pane to include form- or context-specific commands or tasks .

The combination of these two areas being open simultaneously allows InfoPath users and designers to complete a set of tasks with the entire window in full view. There is no need to either tab or toggle between multiple windows for either screens or dialog boxes.

Form Area

Visually, an InfoPath form contains spaces reserved for entering information; this form is very similar to a Web page or other types of structured document-editing tools. As we will see later, the pattern for developing InfoPath forms is similar to the design of table-driven Web pages. At runtime, all forms created within InfoPath are based on a template structure. The template is usually created by a single person and then distributed or published to a shared location like a Web site, file share, or a WSS Forms Library.

The form template includes things like the XML schema that determines the structure of the completed data. When a form is distributed, users are notified through the WSS alert, e-mail, or a workflow process that contains a Uniform Resource Locator (URL) or a Uniform Resource Name (URN). InfoPath forms that are based on URL identifiers are stored in a network storage location. Forms that contain a URN are installed on the local computer. These forms are considered part of a trusted solution and are automatically given greater security access and file permissions on the user s local computer. We will cover these topics more in Chapter 6, when we discuss developing Trusted Forms, and in Chapter 10, when we discuss deployment strategies.

The InfoPath workspace displays either the URN or URL address at the bottom left of the InfoPath workspace, as seen in Figure 2.2. Form modification is maintained by the form designer, and InfoPath provides a mechanism to maintain version information within the form template.

click to expand
Figure 2.2: The installed location of the template as seen in InfoPath.

A user can create a runtime version of a form by clicking on either the URN or URL, which opens the form solution in the InfoPath client. Once the form is open, the user fills in the blanks, fixes any errors, and then submits completed XML for processing. Depending on the design rules, users may add additional or repeating sections in the form. Unlike with a Web page, which requires a post to notify data entry errors, InfoPath actually validates the data during data entry.

Data entry, validation, and formatting rules are built into the form template during the design process. They are used to specify things like data types, values, and data validation that are applied to the InfoPath form data. The form template is responsible for maintaining these rules for both the form and editable fields. If any data item fails the validation rules, InfoPath immediately adds a red border around the editable region, as shown in Figure 2.3. This notification provides immediate visual feedback of the error and provides a field- and form-level validation mechanism. End users are able to save the form locally with errors but are unable to submit the form for approval or processing until all errors are fixed.

click to expand
Figure 2.3: A field that has failed data validation.

Solution templates control both the schema and layout of forms, although the end user can t edit every aspect of an InfoPath form. For example, when you re designing a form, you can edit text labels. InfoPath provides additional visual cues to allow users and designers to see when and where they can make changes. For example, when a user filling in a form hovers over a region, the field becomes highlighted with a gray border indicating that the section can be updated. As another example, Figure 2.4 shows an editable region in a table with the drop-down indicator that appears when the user enters the area by pressing the tab key or a mouse click.

click to expand
Figure 2.4: A drop-down indicator within a form.

Repeating and Optional Sections

Forms may contain many different types of controls. One of the most important is the repeating section or controls that include lists, tables, and optional control sections. This makes forms more flexible when users are entering data. For example, rather than designing an expense report with a set number of lines, users can determine the number of expenses that they need to add. The following repeating and optional controls are available:

Lists: Each item in a list contains a single field. For example, an employee contact form could have a list of departments.

Repeating Sections: This is a derivation of the list in which each item consists of more than one field; e.g., a form that includes text fields for name, address, and phone number. A repeating section can include a table, list, or section.

Repeating Tables: In a table, each column represents a field and each row represents an additional occurrence of the group of fields. Like repeating sections, repeating tables are used to create an entire record, such as a list of contacts.

Optional Sections: These are sections that are inserted or removed by users while they are filling out the form. The form designer specifies whether these sections should appear in a blank form, or during runtime if a user decides to insert them. For example, a notes field could appear on a contact form only when a user inserts it. If the user decides not to insert a note, he can delete the entire section instead of deleting the field data. A repeating section or repeating table, such as a list of account numbers or expense items, can appear if users decide they want to insert it. Also, any sections can be made optional when they are placed within an optional section.

Task Panes

Task panes are HTML files that are either linked or included within the form template. They are designed to provide additional features or context-specific help during either runtime or design mode.

Figure 2.5 shows the title bar at the top of the task pane that contains the name of the active pane. On the right of the title bar is a drop-down indicator that allows quick navigation to other task panes that are enabled globally or within the current form.


Figure 2.5: The task pane title area.

Within each task pane and below the title bar is the navigation pane, as shown in Figure 2.6. The navigation pane consists of a set of buttons that are used to navigate between the currently available task panes.


Figure 2.6: The task pane navigation buttons.



Programming Microsoft Infopath. A Developers Guide
Programming Microsoft Infopath: A Developers Guide
ISBN: 1584504536
EAN: 2147483647
Year: 2006
Pages: 111
Authors: Thom Robbins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net