Expand my Community achievements bar.

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

Help removing current instance of Row1 from a Table.

Avatar

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

Avatar

Correct answer by
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

4 Replies

Avatar

Correct answer by
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

Avatar

Level 1

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

Avatar

Level 1

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

Avatar

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