Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Help removing current instance of Row1 from a Table.

gmailJerald
Level 2
Level 2

I have a table in which I have a Header Row, Row1, and Footer Row.  I have a button in the header that adds new instances of Row1.  There's a button in Row1 that is supposed to remove the current instance.  However, when I click the button to remove an instance, it always removes the first instance of Row1.  I used the Action Wizard to get the code for the button:

this.resolveNode('Table9._Row1').removeInstance(this.parent.index);

if(xfa.host.version<8) {

xfa.form.recalculate(1);

}

Any help would be greatly appreciated.

Thanks,

J

1 Accepted Solution
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi, The code looks ok to me, though if your button is within a subform with a table cell then you would have to use this.parent.parent.index in the removeInstance call. Regards Bruce

View solution in original post

0 Replies
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi, The code looks ok to me, though if your button is within a subform with a table cell then you would have to use this.parent.parent.index in the removeInstance call. Regards Bruce

smythkowalczyk
Level 1
Level 1

I had also been struggling with this. Thanks for the response. Worked perfectly!

Dara_Tek
Level 1
Level 1

This coding is working fine On version 8, but on  new or latest version not working, how can i do?

_Bruce_Robertson
Level 10
Level 10

Hi,

This code still works for me, are you getting an error message? Can you share your form so we can have a look?

Regards

Bruce