Repeating Section in a SharePoint List - InfoPath Dev Sign in | Join | Help in Newbie Questions InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Newbie Questions » Repeating Section in a SharePoint List Repeating Section in a SharePoint List Last post 12-20-2016 07:38 AM by Hilary Stoupa. 23 replies. Page 1 of 2 (24 items) 1 2 Next > Sort Posts: Oldest to newest Newest to oldest Previous Next 12-06-2016 11:15 AM Soraie Joined on 12-06-2016 Posts 15 Repeating Section in a SharePoint List Reply Contact Hi, I currently have an InfoPath Form connected to a SharePoint List. When building the form, I've already checked off that this form will be managing multiple items in the list. I've read other forum posts on how to solve most of my issues but I'm having a few others. I have 2 repeating sections. The first section I only wanted one instance of it so I hid the other sections. The second section I was it to show everything. The form works correctly to fill out data. When submitting the form, it'll create multiple rows of items in the list, one per repeated section. That isn't really a huge issue for me, but when I want to view an item, it'll only show that specific section. I want to view all the sections just like how I filled it out. Is that possible? I'd also like to ask how I would fill out the first section of repeated parts. When I hide the repeated sections, those fields become blank. I want the first section's fields to be sort of global and used for all the items that are added. I've tried using the XML schema as secondary data source but it does not change the second section and onward. For example, I have a user and a computer. If I repeat the computer section, the user section is also repeated (But I hid the repeated user section). How can I use the first user section's data to populate all the other user section's data for all the computers? This also for when I view an item in the list, I'd like to view all the associated computers for the user? Thank you, Soraie Filed under: SharePoint 2010 list, info path 2010, repeatable section 12-09-2016 09:17 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact I would probably use a secondary XML file for the "global" fields and add rules to set the main data source values when they change. In your form load rules, you'll need to set the global fields to the current main data source values for your Edit view. As to seeing "all the computers" - maybe add another secondary data connection to the form that queries the same list? You could set a query field in that data connection to only return the data for that user.... but I may not quite be understanding the request. :) Hilary Stoupa 12-09-2016 01:12 PM In reply to Soraie Joined on 12-06-2016 Posts 15 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact Hello, I've tried adding a secondary XML to change all the values to become the same. Issue I'm having is that none of the repeated sections repeat the value. They just remain blank. I've found one of the infopath forms that you've posted to another thread and mimicked the form but I don't get the same results as you had in the template. Secondly regarding the "all computers" : Username: Soraie Computer: Dell Computer: HP Computer: Lenovo ^ This will be the form that is entered or submitted In the list it'll appear like: Soraie Dell *Blank* Hp *Blank* Lenovo When I click on the first item, I want it to look like the form that was submitted but instead it'll show: Username: Soraie Computer: Dell Thank you! 12-09-2016 04:14 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact Can you attach your template in a reply under the options tab? I could take a look at the rules - see why your name isn't getting set in the following rows. As to the second issue - would setting the query fields to the common value, like the user name, then querying get all the items back in the form? Maybe on form load? I just did a quick test & this seemed to work. So - let's pretend your Username is populated in all your rows. In your form, on load, if the UserName data field is not blank, you could set the UserName query field to the value and then query the main data source. Hope that makes sense. :) Hilary Stoupa 12-12-2016 08:01 AM In reply to Soraie Joined on 12-06-2016 Posts 15 Re: Repeating Section in a SharePoint List Repeating_test.xsn Mark as Not AnswerMark as Answer... Reply Contact Good Morning Hilary, I've attached my example form. This form is similar to one of the examples that you replied back to another question but I could not get it to work like you had so sorry if this seems to be repeated. I'm going to have to learn how to do the query on load because I don't really understand how it works. So if I query for the username, and it finds a bunch of rows, it'll just populate the repeating section for computer types? Sorry this is really new to me. :( Thank you for your time! 12-12-2016 08:46 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Repeating Section in a SharePoint List Repeating_test.xsn Mark as Not AnswerMark as Answer... Reply Contact I've made some changes to this - added details in the form, so save this locally, and then right click and select design and preview from there. Your actual form is a SharePoint list form, right? If so - yes, the rows will auto populate on query if you set the main data source query field for user name and then run the query. Hilary Stoupa 12-19-2016 06:37 AM In reply to Soraie Joined on 12-06-2016 Posts 15 Re: Repeating Section in a SharePoint List Capture.zip Mark as Not AnswerMark as Answer... Reply Contact Hilary, Thank you for the information and template! The secondary XML data source helped a lot and now the fields are filled in. I'm still struggling on getting the data connection to query properly though. My main data source is connected to the sharepoint list and I cannot modify it so I created a secondary data source to query for the user name (ID, capture.png). When I select an item (capture1.png), it'll still only show me one row item (capture2.png). Do you have any way to show me how to use data connections for this in images? I'm sorry for being inexperienced and really slow at this issue. Thank you again for your assistance!!!!! 12-19-2016 07:39 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact If your main data source is a SharePoint List it has query fields already - those are the ones you need to use. Click show advanced view in the data source task pane, click the plus by the query fields & you'll see them. Set one of the query fields to a value and then run the query using a rule, and you should see the results returned in the data fields. Feel free to attach your template to a reply (or email me via the forum & then I can reply & you can send it as an attachment) if you need help. Hilary Stoupa 12-19-2016 08:13 AM In reply to Soraie Joined on 12-06-2016 Posts 15 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact Hilary, The form load rules work fine on the infopath and xml end. I've saved a preview as XML and reopened it to view that the data was correct in the repeating sections and they are. The only issue is on sharepoint side where if I click on view item on one of the item rows, it'll still only show me one row instead of all the rows that were entered. I will try to figure out the query portion on using it to query for username, but I'm currently not having any luck with it displaying properly. Sadly, this is attached to a private sharepoint site, so I cannot send the template over unless I can somehow disconnect the form. Thank you for all your help! 12-19-2016 08:18 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact Are you setting the query field in the main data source? Then running the query? Hilary Stoupa 12-19-2016 08:29 AM In reply to Soraie Joined on 12-06-2016 Posts 15 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact I'm not setting the query fields to anything specific. I know I want to query the data but would I create a rule under the Username or the computer type (query for data)? 12-19-2016 08:35 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact I knew you could figure it out. :) Hilary Stoupa 12-19-2016 08:41 AM In reply to Soraie Joined on 12-06-2016 Posts 15 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact Thank you! :) Sadly, another issue came up where if I view items, it does not query based on username it'll group all the computers together. For example, If I view a row where the username is John, it'll also populate all the other users computers but the username in the form load will be John. :( And I thought I solved it..... 12-19-2016 08:46 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: Repeating Section in a SharePoint List Mark as Not AnswerMark as Answer... Reply Contact Maybe attach some more screenshots that show your current rules & results. Hilary Stoupa 12-19-2016 08:58 AM In reply to Soraie Joined on 12-06-2016 Posts 15 Re: Repeating Section in a SharePoint List Capture.zip Mark as Not AnswerMark as Answer... Reply Contact Hilary, I've attached screenshots with the details. As you can see from the list John does not have a value of 634, but it still shows up when I view an item. I'm assuming this is because when I query for data in the form load, it picks up all of this type of data and fills it in, i don't know how to make a condition where if the name field is not blank or is specific to the row I clicked on. If there are any other specific screens you like to see, I'll do my best to post them! I'm really sorry for all of this inconvenience :( Edit: Any way to have the form load query based on username and not just in general? This seems to be querying all the fields regardless of the Username/ID. Page 1 of 2 (24 items) 1 2 Next > Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Can you attach your template in a reply under the options tab? I could take a look at the rules - see why your name isn't getting set in the following rows. As to the second issue - would setting the query fields to the common value, like the user name, then querying get all the items back in the form? Maybe on form load? I just did a quick test & this seemed to work. So - let's pretend your Username is populated in all your rows. In your form, on load, if the UserName data field is not blank, you could set the UserName query field to the value and then query the main data source. Hope that makes sense. :)