<p>Within my InfoPath form (which has to be loaded within a SharePoint Portal by the browser)I have a repeating table containing multiple fields. Now I would like to make the first textfield autoincrement starting by 1. How exactly can I do this?</p>

<p>I have already heard of a way by using the "count" function but this produces errors or in best case a static number which unfortunately does not count.
The function I have added for the field is "count(.) + 1"</p>

<p>Any suggestions?</p>

Let's say your repeating group is called "item" and your autoincrement field is called "index". The default value of the index field should be
```
```
count(/my:myFields/my:item)
```
```
This should count correctly for you.