Skip to main content
Nintex Community Menu Bar
Solved

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

  • July 18, 2022
  • 5 replies
  • 780 views

harfmt1
Forum|alt.badge.img+4

I want to increment row numbers in a repeating section:

e.g. 

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

I used the following (dodgy?) setup:

 

Create count + 1 variable

e.g. 

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

 

And then a rule to populate the field:

 

5 replies

bamaeric
Forum|alt.badge.img+14
  • Apprentice
  • July 18, 2022

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.


harfmt1
Forum|alt.badge.img+4
  • Author
  • Scholar
  • July 18, 2022

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

I'm using New Responsive Designer, 


harfmt1
Forum|alt.badge.img+4
  • Author
  • Scholar
  • Answer
  • July 22, 2022

I used the following (dodgy?) setup:

 

Create count + 1 variable

e.g. 

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

 

And then a rule to populate the field:

 


Forum|alt.badge.img

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?


Forum|alt.badge.img

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