Lab 13: Schemas in InfoPath 2003
Microsoft® Office InfoPath™ 2003
Summary: Learn how to create new groups in the form's schema, move existing groups to new locations in the schema, and replace one schema with a different one. (3 printed pages)
Download the odc_INF03_Labs.exe sample file.
- A familiarity with Extensible Markup Language (XML) schemas.
Contoso Corporation is using a Microsoft® Office InfoPath™ 2003 form built by its information technology department. However, the form needs to be incorporated into another process. To integrate the form with the existing process, you must modify the form's schema.
In this lab, you learn how to do the following:
- Manually add new groups to the data source
- Move groups in the data source
- Replace data sources
Exercise 1: Add and Move a Group in the Data Source
The data source determines the structure of fields and groups that define and store data for an InfoPath form. In some cases, the fields or groups in the data source may not be compatible with the structure of the back-end process. In this scenario, the customerContainer group needs to be placed in another group named customerInfo. In this exercise, learn how to add a group to the data source and then move that group to another group in the data source.
To add a group to the data source
In the Fill Out a Form dialog box, click Design a Form.
In the Design a Form task pane, click On My Computer.
In the Open in Design Mode dialog box, locate the folder where you installed the training files, and then double-click the Lab 13 folder.
Select Lab13Template.xsn, and then click Open.
The Contoso sales report form opens in design mode.
On the View menu, click Data Source.
In the Data Source task pane, in the Data source list, right-click myFields.
On the shortcut menu, click Add.
In the Add Field or Group dialog box, in the Name text box, type customerInfo.
In the Type list, click Group.
Now that you have created the customerInfo group, you need to move it to the appropriate location in the data source.
To move the group to another location
- In the Data Source task pane, right-click customerContainer.
- On the shortcut menu, click Move.
- In the Movie Field or Group dialog box, in the Select a new group list , click customerInfo.
- When prompted to continue, click Yes.
Exercise 2: Replace the Form's Schema
To accommodate the back-end process, you discover that you need to make more changes to the schema then you expected. To save time, you can replace the form's entire schema with a schema that the developer who designed the back-end process has given you.
To replace the form's schema with a new schema
- With the form still open, on the Tools menu, click Convert Main Data Source.
- In the Data Source Wizard, click Browse. Locate the folder where you installed the training files. In the Lab 13 folder, find and open the file called newschema.xsd.
- Click Next.
- When prompted to add an additional schema, click No, and then click Finish.
Fields and groups from the new schema now appear in the Data Source task pane (the schemas are similar, but now the salesRepresentative, period, email, and department nodes are grouped under the reportHeader group).
In this lab, you learned how to create new groups in the form's schema, move existing groups to new locations in the schema, and replace one schema with a different one.