In this article, I will show you How to create an InfoPath Form with both Non-repeating and Repeating Sections to submit multiple items.
*Requirements: SharePoint Site, Microsoft InfoPath 2010
In order to have repeating sections – which means you will able to create/edit multiple items in just only one form – you will need to have a list created in InfoPath and has the option Manage multiple list items with this form checked. If you are customizing a list that has been created in SharePoint, then you will need to start over to create a new list in InfoPath. There is no way to change this property once the list has been created.
Step 1 – Create a new SharePoint List in InfoPath. Open InfoPath → Create a new SharePoint List → Enter your site and list information → Remember to tick on the Manage multiple list items with this form → Finish.
Step 2 – Create Repeating Section. By default, all the fields are repetitive. All you need is to drag the field from the right panel into your form.
These fields are wrapped in a repeating section, which indicates that we can have this section many times. To allow inserting this section in order to submit multiple items, Right click on the section → Repeating Section Properties → Check on “Allow users to insert and delete the sections” and “Show insert button and hint text” → OK.
Step 3 – Create Non-repeating Section. For some reasons, you may want some fields just need to be entered once and all other items inherit the same value. For example, the Title for all items are the same, the difference between items are the Item ID. Then, you will want the Title field to not repeat when insert a new section. Otherwise user will have to enter the Title again and again for each item they insert.
In order to create a Non-repeating Section, follow the same step as you create a Repeating Section, but don’t check the two options that allow user to insert new sections.
Select the Repeating Section that contains the Title field → Manage Rules
Add a new Formatting Rule → Set the condition as follow
count(preceding-sibling::my:SharePointListItem_RW) > 0
(explanation: if you press on Show advanced view at the bottom of the Fields panel, you will see the Repeating Section name – my:SharePointListItem_RW. So we count if this section has repeated, then hide it)
Press OK → Tick on Hide this control in the Rules panels.
That’s all. Now you can have both Repeating and Non-Repeating Sections in one form to submit multiple items.
I hope that this tutorial has helped you to achieve your goals.