Question

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?

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"

Any suggestions?

Was it helpful?

Solution

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.

OTHER TIPS

I suspect you really want position(). Count is just going to return the total count of nodes that match the xpath expression you give it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top