Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Dynamic Table Row Removal

Avatar

Former Community Member
I'm using LiveCycle Form Designer 8 and Acrobat Reader 7.09



I've created a simple dynamic table that has an ADD ROW button that uses _Row1.addInstance(1); to add a new row and that works great. I then added the Delete Row button in a SubForm to the first cell of the row with the JavaScript _Row1.removeInstance(this.parent.index).



The problem is that the Delete Row button always deletes the first row instead of the row that the button is in. So that indicates that this.parent.index = 0. If I force the value it does remove that specific line but I want the removeInstance to remove the line that has been selected.



How do I get the index to reflect the value of the row that the removeInstance button is in? I must be missing something very basic.
3 Replies

Avatar

Former Community Member
I think I found my problem.



I had originally created a SubForm in the first cell of the row based on the HELP instructions. When I removed the SubForm the DELETE Row button worked for the line selected.



Does any one have a description of how the different nesting of SubForms works in relationship to an Index used for a JavaScript function?

Avatar

Former Community Member
Okay, I have done the same thing, but as you had mentioned beforehand, it only deletes the value that is the interger. What do I do in order to delete the line it is on as well?

Avatar

Former Community Member

I'm having the same problem. I tried removeinstance(this.index) but that seems to resolve to index 0 no matter how many instances there are.

Cheers,

Al