Note sure if this is what you were after.
I created a simple table with two rows, one row has 4 cols, has a button to show the second row and is visible. The second row has the cells merged and is hidden.
I have a button to create 'new rows' positioned outside the table. The trick is to wrap the table in a subform and repeat the subform (sfTable), NOT the table (Table1). So instead of creating new rows, you are actually creating whole new tables wrapped in a subform. The page also needs to be flowed.
![1468088_pastedImage_0.png 1468088_pastedImage_0.png](/t5/image/serverpage/image-id/11040i363287A44D1AB1B0/image-size/large?v=v2&px=999)
![1468089_pastedImage_1.png 1468089_pastedImage_1.png](/t5/image/serverpage/image-id/11041iB6B7FEA9DA7BBFF8/image-size/large?v=v2&px=999)
form1.#subform[0].sfTable.Table1.Row1.btnShowRow::click - (JavaScript, client)
this.resolveNode("RowMerged").presence = "visible";
form1.#subform[0].btnNewRow::click - (JavaScript, client)
this.resolveNode('form1.#subform._sfTable').addInstance(1);
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
}
What this does is this:-
You can keep adding new rows (subforms) and in each instance you can show (unhide) the single merged row if you wish. Note: I havent added a hide button.
![1468090_pastedImage_5.png 1468090_pastedImage_5.png](/t5/image/serverpage/image-id/11042iD8F702F2AD74593C/image-size/large?v=v2&px=999)