Answered
Hi all, I'm hoping someone can help me out there. I have created a dynamic table with 'add' and 'delete' buttons. My problem is when I add a new row I would like the row and subsequent rows to be numbered automatically (in the left-hand column). I'm not too sure of the actual scripting involved.
Thanks in advance for your help.
this.rawValue = (this.parent.index + 1).toString();
This code will add the line number at the time the line is added to the table. If lines will be deleted or moved at some later time you will need to add an IndexChange event script as well if you want the numbers to be in order.
I've got an example of line numbering somewhere on this site, but you'll have to look around. I think it might be attached to this eseminar: Extending LC Forms
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script