Appendix A. Auto-Increment Repeating Tables

This appendix outlines several options to produce an auto-incrementing value in a repeating table. This book’s downloadable content provides examples of these methods.

Use the position() Function in a Calculated Value Control

Create a new column in your repeating table and add a Calculated Value control to the cell. If you attempt to enter position() into the XPath, you receive a message stating that it is not supported; technically it is. Therefore, use the function button to select count() and select a field or group. Right-click the control and select the Calculated Value properties option. Change the XPath expression to position() and click OK.

Preview your form. Entering new items auto-increments ...

Get InfoPath with SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.