In Table1, Row1 is a repeatable row with an autonumber field and add/delete buttons. When you click "add" there is another row added to Table1 AND Table2, with the same autonumber. When you click "delete" I need it to delete the same relative row in both tables.
So if the delete button for Table1.Row1[2] is clicked, I want it to delete Table1.Row1[2] and Table2.Row1[2]. Right now it will delete Table1.Row1[2] and Table2.Row1[0].
I know it needs to loop and count, but I'm not sure how to incorporate that into the delete action for two separate tables.
Here's my code so far:
this.resolveNode('Table1._Row1').removeInstance(this.parent.parent.index);
this.resolveNode('Table2._Row1').removeInstance(this.parent.index);
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
}
Solved! Go to Solution.
Views
Replies
Total Likes
I think the problem is you use the wrong index for the second table.
Try the following.
this.resolveNode('Table2._Row1').removeInstance(this.parent.parent.index);
Views
Replies
Total Likes
I think the problem is you use the wrong index for the second table.
Try the following.
this.resolveNode('Table2._Row1').removeInstance(this.parent.parent.index);
Views
Replies
Total Likes
Such a simple error. Thank you!
Views
Replies
Total Likes