Basically, you will need to auto increment a number field when a new section is added to the form. There is a very simple way to handle this and it only takes one rule and one field. To do this, follow these steps.

Create a new interger field and add to your repeating group. For this example, we will name it Count

Right click on Count and click properties, then click the button.

Check the box to Edit XPath (advanced) and enter in the following formula: count(../preceding-sibling::*) + 1

Click Verify Formula then click OK

Make sure ‘Refresh value when formula is recalculated’ is checked

Click OK

If you have not added the repeating section to your form, do this now

Preview your form to make sure that everything is working properly

Click on the repeating section and then click ‘Manage Rules’ in the ribbon

Add the following formatting rule

For the Condition:

Field: Count

is greater than or equal to5

Check ‘Don’t allow users to insert or delete this control’

Preview your form

You should now see that you can only be able to add a total of five repeating sections. You can change this number to limit what you actually need.

I have included an example template that demonstrates how this works. Please note that this form was created in InfoPath 2013 and is a browser based form.

Like this:

Attachments in InfoPath are great. The only issue with this, is that you can only attach one file to your form at a time. In order to get a around this, you will need to add a handy dandy repeating section. I have also added a count box to show how many attachments have been added to your form. You also will have the ability to hide all of your attachments. That’s where the count comes in handy.

I like to use this hide function for my attachments especially when I have a form that goes through an approval process. I have attached a starter form using these controls. The ‘attCount’ field has a default value set to count how many controls have been added to your form. There is one rule set for the repeating section to hide it the ‘hideAttachments’ is set to ‘TRUE’.

I saved the form in a 2007 web based format. You should be able to open in all versions of InfoPath 2007 – 2013.

Like this:

Our current migration from MOSS to SP2013 has been interesting, needless to say. Because I am an administrator I never see these little issues. This is one of the latest fires I had to put out. This popped up for different users whenever they would click on new document. At first, I thought it was s permission issue, but that was not it.

Turns out that this is an issue with Internet Explorer 8 (of course). The new document+ calls a javascript function that ie8 cannot recognize. Instead of opening the web based InfoPath form, it tries to add a document. After testing on other systems using ie9 +, Firefox, and Chrome this is the only logical explanation.

To address this issue, I had to add a Page Viewer web part to a page and link to the opened view of the form. Not the most elegant approach, but it works.