on 07-09-2008 9:13 AM
Hi,
I've created a dynamic table (with add/ remove buttons) in which one column should have an incremented number which should be automatically added. So if I click on the add-button, I'd like to have each row numbered with an incremented value. Anyone can tell me how to do this?
thanks,
mading
Hi Martin
1) Place a TextField in the Column where you would like to see the incremental value.
2) Place the following code in the Calculate Event of this TextField. (remember to set your language to JavaScript)
this.parent.index;
hope this helps,
harman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harman,
thank you for your answer (6pts rewarded). It works but I will have to click on the add button of each new row instead of clicking on the topmost add button. If I keep on clicking on the topmost add button, the numbering is like this:
No. 0 <-- I keep on clicking on the add button in this row
No. 6
No. 1
No. 2
No. 3
No. 4
No. 5
Thanks,
Martin
Hi Martin,
It really shouldnu2019t matter where you place the button to add a row to the table; the incremental code is u2018relativeu2019 to tableu2019s index. Take the link below for example, you can move the u2018+u2019 button inside your table column, and the incremental still works fine. Please compare with your formu2019s settings with this link below:
http://www.adobe.com/devnet/livecycle/articles/AddingRemovingTableRows.pdf
Hope this helps,
Harman
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.