Expand my Community achievements bar.

SOLVED

Numbering rows in table within a calculated text field

Avatar

Level 3

What calculated script will work to incrementally number a calculated text field and return the row number in the left-most field of a table?

What I need is that each row within the table is numbered consecutively in the left-most field and that any new rows created are correctly numbered at the user-end.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

You would need to move the script to the layout:ready event. This isn't the most efficient event, because it fires every time the from changes. However because of this it suits your requirements well, because every time a row is added or deleted, the index numbers will update.

Here is a sample with letters (for a maximum of four rows). The same approach would apply to numbers. The script is in the layout:ready event of the first cell.

There is a sample here: https://acrobat.com/#d=Zk2XWWDUWNfG*VuRTNy5QQ

Good luck,

Niall

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi,

You would need to move the script to the layout:ready event. This isn't the most efficient event, because it fires every time the from changes. However because of this it suits your requirements well, because every time a row is added or deleted, the index numbers will update.

Here is a sample with letters (for a maximum of four rows). The same approach would apply to numbers. The script is in the layout:ready event of the first cell.

There is a sample here: https://acrobat.com/#d=Zk2XWWDUWNfG*VuRTNy5QQ

Good luck,

Niall