Display the row number in a repeating table

Microsoft Office InfoPath

Show All Show All

Display the row number in a repeating table

You can use expression boxes to display the row number in a repeating table, as well as perform other calculations. When you create formulas in an expression box, you refer to the fields and groups to which controls on the form are bound, rather than the controls themselves. The formulas are created using XPath, but you can follow these steps without knowing XPath.

  1. In design mode, place the insertion point where you want to insert the expression box.

    Note  The expression box must be part of the repeating table.

  2. If the Controls task pane is not visible, click More Controls on the Insert menu.
  3. In the Controls task pane, click Expression Box.
  4. In the Insert Expression Box dialog box, type position() in the XPath box.
  5. To test the formula, click Preview Form on the Standard toolbar.