SharePoint Products TechCenter >
SharePoint Products and Technologies Forums
>
SharePoint - InfoPath Forms Services
>
Pull Sharepoint List Items into an Infopath 2007 Browser Enabled Form's Repeating Table
Pull Sharepoint List Items into an Infopath 2007 Browser Enabled Form's Repeating Table
- Is the question in the topic possible? Basically, our Sharepoint list contains list items and they are all grouped by a certain date. We would like for our Infopath form's repeating table to pull in all of the list items in that list. The only input that the user will enter in is the date that they are all grouped by. After choosing the date, the repeating table should be populated with the list items filtered by the date the user inputs.
Is there a blog post that someone has posted doing something similar to this?
Answers
- Well, the first part is easy. The 2nd part can't be done without code. You're basically saying you want to dynamically filter your SharePoint list data connection with data in the form. This is a big-time request that has thankfully been rectified in InfoPath 2010 + SharePoint 2010, but it requires code in 2007 unless you're willing to download the entire list's data and only display the relevant data (this isn't a filter on the download, but it's a filter on the display). If this is ok, then here is the method:
1) Create your receive data connection to the list
2) In your template, go to data source in the right pane, choose your sharepoint list data connection, drill down to the repeating group that contains all the fields, and drag that whole repeating group to the canvas - when prompted, choose to make it a repeating table. This auto-creates a repeating table with all your fields and auto-populates with ALL the data from the default view of that list
3) Now, add a field to your main data source (date, I suppose)
4) Drag that field to your canvas
5) Double-click on the repeating table from 2 and go to Display > Conditional Formatting
6) Set a condition that says "If date field from sharepoint list is not equal to date field in infopath form, then hide control." This will hide all the records that don't match your date. Be careful to make sure the syntax of the dates is exactly the same.
SharePoint Architect || My Blog- Marked As Answer byLoran Cehack Monday, November 09, 2009 4:46 PM
All Replies
- Well, the first part is easy. The 2nd part can't be done without code. You're basically saying you want to dynamically filter your SharePoint list data connection with data in the form. This is a big-time request that has thankfully been rectified in InfoPath 2010 + SharePoint 2010, but it requires code in 2007 unless you're willing to download the entire list's data and only display the relevant data (this isn't a filter on the download, but it's a filter on the display). If this is ok, then here is the method:
1) Create your receive data connection to the list
2) In your template, go to data source in the right pane, choose your sharepoint list data connection, drill down to the repeating group that contains all the fields, and drag that whole repeating group to the canvas - when prompted, choose to make it a repeating table. This auto-creates a repeating table with all your fields and auto-populates with ALL the data from the default view of that list
3) Now, add a field to your main data source (date, I suppose)
4) Drag that field to your canvas
5) Double-click on the repeating table from 2 and go to Display > Conditional Formatting
6) Set a condition that says "If date field from sharepoint list is not equal to date field in infopath form, then hide control." This will hide all the records that don't match your date. Be careful to make sure the syntax of the dates is exactly the same.
SharePoint Architect || My Blog- Marked As Answer byLoran Cehack Monday, November 09, 2009 4:46 PM
- Thanks. It's not the best solution but it definitely works.
- I will soon be writing a blog on Qdabra's new qRules 2.0, which will include dynamically filtering of SharePoint XML data connections that use the owssvr.dll method. This will meet your needs better, but it does introduce code to your form template.
SharePoint Architect || My Blog

