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.
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:
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:
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.
The below one is the modified one which I modify in the repeating table:
After this, you can save and publish the form and once you open the form the data will be shown like below:
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.
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:
Then double-click on the field and from the ribbon click on Default value from the Properties tab as shown in the figure below:
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:
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:
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:
You may like the following InfoPath tutorials:
- InfoPath more than two radio buttons in SharePoint 2013
- Check more than 5 conditions in InfoPath 2013 Rule
- InfoPath alternatives for designing SharePoint Forms
- Publish InfoPath Form to SharePoint Online Office 365 Step by Step Tutorial
- InfoPath cannot save the following form access denied SharePoint Online
In this tutorial, we learned, infopath repeating table, infopath repeating table sharepoint list, etc.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com