In this post we will discuss how to show a SharePoint list data in a repeating table in infopath 2010. Also you can check out my previous posts on:
Till now I am assuming, you have a SharePoint list and a data connection that will retrieve the data from the Sharepoint 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 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 datafields 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 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 donot 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 readonly 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 readonly mode.