Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

delete \\add rows by button

Avatar

Level 3

I have made buttons that adds and deletes rows on my Form

I have used this script to button ((add rows)):

Tablesons._Row1.addInstance ();

And this code to the button ((delete rows )) :

var vRows = Tablesons._Row.count-1;

for(var i=vRows;i>0;i--){

if (Tablesons.resolveNode("Row1[" + i + "]").Cell1.rawValue!==1) {

form1.main.Tablesons._Row1.removeInstance(i);

  }

}

===

the Add button works perfectly

but the delete button is do nothing..

what is the wrong with it  ?!

((Tablesons)) is the table name .

add delete rows.jpg

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Here is a dynamic table sample with add and delete functionality, please refer it.

Shared Files - Acrobat.com

Thanks,

Mayank

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Here is a dynamic table sample with add and delete functionality, please refer it.

Shared Files - Acrobat.com

Thanks,

Mayank