Autonumber repeating table rows in InfoPath 2010

Thanks to S.Y.M. Wong-A-Ton (www.bizsupportonline.net)

You can in InfoPath autonumber repeating table rows as follows:

  1. In InfoPath Designer 2010, create a new Blank Form template.
  2. On the Home tab under the Controls  group, click Repeating Table and add a repeating table with 3 columns to the form template.
  3. Right-click the first field (field1) in the repeating table and choose Change Control and then Calculated Value from the context menu that appears.
  4. With the first field (field1) still selected, click the Properties tab or double-click field1 to bring forward the Properties tab.
  5. On the Properties tab under the Properties group, click Default Value.
  6. On the Field or Group Properties dialog box on the Data tab under the Default Value section, click the formula button behind the Value text box.
  7. On the Insert Formula dialog box, select the Edit XPath (advanced) check box.
  8. On the Insert Formula dialog box, type the follow formula into the Formula text box:count(../preceding-sibling::*) + 1
  9. On the Insert Formula dialog box, click Verify Formula to ensure that the formula does not contain any errors. Click OK to close the message box that says whether the formula contains or does not contain errors. Correct any errors if necessary.
  10. On the Insert Formula dialog box, click OK.
  11. On the Field or Group Properties dialog box, ensure that the Refresh value when formula is recalculated check box is selected, and then click OK.
  12. Save the InfoPath form template and publish it for example to a SharePoint form library.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s