Individual row numbers within repeater

Hi Everyone,

I get the feeling this is pretty easy to do, yet I’m struggling to find the solution. I’m trying to number each row in my repeater consecutively, and have the numbers continue as I add rows. In other words, if my repeater loads with 1 row, then I click an ‘add row’ button, the new row that appears has the number ‘2’ in it.

Row #NameAddress_______________Email
1.___John Smith______23 World Way, Chicago, IL
+ Add Row

OnItemLoad: set text to [[Item.index]].) [[“whatever else you want HERE”]].


You’re my hero. Thank you!

De nada! Happy to help

@jlhelmers I have some questions related to this.

  1. What are you applying the OnItemLoad to? The rectangle that holds the line number?
  2. How do you keep the first row at 1 and subsequent rows adding 1 each time?
    In my example I start out with one row, have an add button for user to add rows. Each time it adds a row it changes the 1st row to 2, then 3, then 4 and subsequent rows are always +1 higher. Attaching my doc.

Hi swhitejp!

Yep, the OnItemLoad can be applied to the widget holding the number. OnClick of the button, add an “Add Rows” interaction to add a row to the repeater, and then edit the OnItemLoad of the repeater to set the text on the number-holding widget to [[Item.index]]. This will increment each added row by a value of one each time.

I’ve attached an example file to demonstrate this. Hope it helps!

ItemIndex.rp (50.8 KB)

1 Like