Insert a repeating table
If you want users to be able to enter information in a table, you can add a repeating table control to your form. Repeating tables display just one row by default. When filling out a form, users can insert additional rows as they need them. For example, you can use a repeating table on an expense report form to collect itemized expenses from employees. The person filling out the form can add only as many expense rows as he or she requires. If your form includes a data connection to an external data source, such as a database, you can use a repeating table to automatically display multiple records.
When users move their mouse pointer over the rows in the repeating table, a shortcut menu button appears to the left of each row. Users can click this button to see options for inserting or removing rows. Users can also quickly insert rows in the table by clicking Insert item below the table. You can customize this hint text or remove it from the form.
Repeating tables are bound to repeating groups. Each column in a repeating table contains a control, and each control is bound to a field that is part of the repeating table's group.
Insert a repeating table (automatically create the data source)
- In design mode, place the insertion point where you want to insert the repeating table.
- If the Controls task pane is not visible, click More Controls on the Insert menu.
- In the Controls task pane, select the Automatically create data source check box.
- Under Insert controls, click Repeating Table.
- In the Number of columns box in the Insert Repeating Table dialog box, enter the number of columns that the table should have.
- The repeating table is created with a text box in each column. To convert the text box to a different type of control, right-click the control, point to Change To on the shortcut menu, and then click the control that you want.
Note You should not move a control that is already on the form into this repeating table, unless the control's field is already part of the table's group.
- To test the repeating table, click Preview Form on the Standard toolbar.
Insert a repeating table (bind to an existing group)
- In design mode, place your insertion point where you want to insert the repeating table.
- If the Controls task pane is not visible, click More Controls on the Insert menu.
- In the Controls task pane, clear the Automatically create data source check box.
- Under Insert controls, click Repeating Table.
- If your form uses more than one data source, click the one that you want to use in the Data source list on the first page of the Repeating Table Binding Wizard.
- On the same page, click the repeating group that you want to bind the table rows to, and then click Next. If your table has only one column, you can select a repeating field instead of a repeating group. If you want to create a new repeating group to bind the table to, right-click the group to which you want to add the repeating group, click Add on the shortcut menu, and then, in the Add Field or Group dialog box, enter the repeating group's properties.
- On the second page of the Repeating Table Binding Wizard, add the columns that you want to include in the table by double-clicking the fields in the Data binding list.If you want to create a new field to add as a column, right-click the group to which the table is bound, click Add on the shortcut menu, and then, in the Add Field or Group dialog box, enter the field's properties.
- To re-order the columns, select a column in the Columns in table list, and then click Move Up or Move Down.
- To test the repeating table, click Preview Form on the Standard toolbar.
Note The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed. Learn more