365 Repeating section - how to capture each row number into the repeating section row

  • 18 July 2022
  • 5 replies

Badge +3

I want to increment row numbers in a repeating section:


Row ID = row num

text field = other data


I've tried using a count of the Row ID collection and placing that value in each Row ID field with a rule. The count works, however, it updates all the Row ID fields in the entire repeating section, not just the one, i think it's working with. 


How do I get it to only update the Row ID in each new row that is created?


Best answer by harfmt1 22 July 2022, 02:03

View original

5 replies

Userlevel 5
Badge +12

Which form designer are you using?


I you're using the Classic designer, you can do this by adding a Calculated Value control inside the repeating section and configure the formula to use the currentRowNumber runtime function. This will display the repeating section row number for each row added.

Badge +3

Definitely not classic designer, which is why I'm having a problem. 

I'm using New Responsive Designer, 

Badge +3

I used the following (dodgy?) setup:


Create count + 1 variable


count([Form].[RptTreatments].[Treatment ID])+1


And then a rule to populate the field:



Hey @harfmt1. Thanks for your response. It achieved most of the requirements that I need except everytime a new row gets added the ID field updates for all rows. I am trying to assign the ID value to the row rather than point it to the variable, so that each row has a unique ID. Any ideas?


All good. I read your OR as an AND. Read twice, code once!