Thursday, March 19, 2015

Automatically Add Row Numbers to InfoPath 2013 Repeating Table

This happens to be my first blog post and I had envisioned that it would be a little more substantial, but if I keep waiting for that great inspiration, this page will be blank well after the next zombie apocalypse. So, without further adieu ...

Did you ever want to automatically add a row number to a repeating table in InfoPath? It's actually incredibly easy.

Follow these steps:

Add a repeating table to your form.

Right-click the field where you want the auto-numbering to appear and select Change Control>Calculated Value.

Right-click the calculated value field and select properties, then change the XPath value to position() by typing directly into the formula field. Then click Apply and OK.

You must type the value directly into the XPath formula field. If you click the formula button and add the position() function you will receive a warning that "Functions position() and last() are not supported, and InfoPath will not let you save the formula.

When your done, you'll see line numbers automatically appear next to each new row you add to your table.

No comments:

Post a Comment