A visitor to my InfoPath blog asked:
Can you put a repeating table in a repeating table?
The short answer is: Yes, you can!
A repeating table is the visual representation of a repeating node in the data source of an InfoPath form template.
So if you want to add a repeating table in a repeating table, all you’d have to do is add a repeating node under the repeating table.
To do this:
- Add a repeating table to an InfoPath form template.
- On the Data Source task pane, right-click the repeating node for the repeating table (e.g. group2 if you did not change the node names), and click Add.
- On the Add Field or Group dialog box, type a name for the new node (e.g. group3), select Group as the Type, select the Repeating check box, and click OK.
- On the Data Source task pane, right-click the repeating node you just added (group3), and click Add.
- On the Add Field or Group dialog box, type a name for the new node (e.g. field4), leave Field (element) selected as the Type, and click OK.
- Repeat the previous 2 steps for as many fields as you want your second repeating table to have as its columns. Your final data source should look something like the following figure:

Figure 1. The data source for a repeating table in a repeating table in InfoPath. - Select the repeating table that you put on the InfoPath form template in step 1 and delete it from the View, not from the data source.
- Drag the repeating node for the main repeating table (group2 in this example) from the Data Source task pane, drop it on the InfoPath form template, and select Repeating Table from the context menu that appears.
Your InfoPath form template should now look something like the following figure:

Figure 2. A repeating table in a repeating table on an InfoPath form.

Comments to this post were closed 30 days after it was published.