InfoPath Q&A: Can you put a repeating table in a repeating table?

by S.Y.M. Wong-A-Ton

Step-by-step instructions for adding a repeating table in a repeating table on an InfoPath form.

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:

  1. Add a repeating table to an InfoPath form template.
  2. 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.
  3. 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.
  4. On the Data Source task pane, right-click the repeating node you just added (group3), and click Add.
  5. 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.
  6. 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:

    The data source for a repeating table in a repeating table in InfoPath
    Figure 1. The data source for a repeating table in a repeating table in InfoPath.

  7. 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.
  8. 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:
A repeating table in a repeating table on an InfoPath form
Figure 2. A repeating table in a repeating table on an InfoPath form.

 Subscribe (RSS | Email)

Related Posts

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

Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. Usage of techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.

Working with InfoPath