InfoPath repeating table example

In this InfoPath tutorial, we will see an InfoPath repeating table example, how to display SharePoint list data in a repeating table in InfoPath 2013/2010.

InfoPath repeating table SharePoint list

Let us see how to show a SharePoint list data in a repeating table in InfoPath in SharePoint.

In the same way, we can display SharePoint list data using a repeating table in InfoPath 2010/2013.

Till now I am assuming, you have a SharePoint list and a data connection that will retrieve the data from the SharePoint 2010 list. In this example I have a list name as “Employees” and my data connection name is Employees also.

You can create a blank InfoPath 2010 form. Now if you will check the data source, our main and new data source that we created in above should look like below:

infopath repeating table
infopath repeating table

Now expand the data fields of Employees data source and drag the d:SharePointListItem_RW to the blank InfoPath form, Once you drag and drop, it will ask you 3 things:

  • Repeating Table
  • Repeating Section with Controls
  • Repeating Section

Select the Repeating Table as shown in the figure below:

infopath repeating table sharepoint list
infopath repeating table sharepoint list

After you select the Repeating table, it will put the field, you can modify the column title in the Repeating table as well as you can delete any column if you do not want to show.

The below one is the default one which comes after I drag and drop.

infopath repeating table example
infopath repeating table example

The below one is the modified one which I modify in the repeating table:

infopath repeating table sharepoint list
infopath repeating table sharepoint list

After this, you can save and publish the form and once you open the form the data will be shown like below:

infopath repeating table with multiple rows
infopath repeating table with multiple rows

Remember all these fields are editable. If you want to make it read-only then right-click on a field in the repeating table and select Textbox properties and then go to the Display tab and select the Read-only checkbox as shown in the figure below.

infopath repeating table default number of rows
infopath repeating table default number of rows

Then click on Ok. Now the field will be in read-only mode.

This is how to display SharePoint list data in a repeating table in InfoPath 2010/2013.

InfoPath repeating table row number (Auto number)

Let us see, how to add an auto number to repeating table rows in InfoPath in SharePoint. It is like adding a serial number field into the repeating table rows in the InfoPath form.

For this add a repeating table to the InfoPath form. By default, the fields will come as the textbox field. So change the particular fields on which you want the auto number to come. Right click on the field -> Change Control -> Calculated value as shown the figure below:

add auto number in infopath form
add auto number in infopath form

Then double-click on the field and from the ribbon click on Default value from the Properties tab as shown in the figure below:

Add auto number to repeating table
Add auto number to repeating table

The above step will open the Field or Group Properties, from the Data tab click on the fx button on the Default value textbox as shown in the fig below:

Add an auto number to repeating table rows in InfoPath 2013
infopath repeating table row number

Then in the Insert Formula dialog box write the below formula and click on verify formula to check whether the formula contains an error or not. Remember to check Edit XPath (advanced) checkbox.

count(../preceding-sibling::*) + 1

The formula should look like below:

infopath repeating section
infopath repeating table row number

Then click on Ok and also click on Ok in the Field or Group Properties dialog box. After you publish the form and you will see the auto number will come like 1,2,3,4,5…. serially for each row as shown in the fig below:

repeating table infopath
repeating table infopath

You may like the following InfoPath tutorials:

In this tutorial, we learned, infopath repeating table, infopath repeating table sharepoint list, etc.

>