Dynamic Tables - not growing the table rows

robertr1124947

02-11-2017

I am working with ES4 and trying to create a table that will grow with the use of a button.  I followed an online tutorial that was about 4 years old, but all the steps were valid with my version of LiveCycle.  So I used the table wizard to create a 3 column table with headers.  Next I placed a button next to the table.  I then used the Action Builder tool to create action which was:

Condition: When button Button1 is clicked

Result: Add a new instance of Row1

This resulted in the following code for the button:

this.resolveNode('Table1._Row1').addInstance(1);

if (xfa.host.version < 😎 {

    xfa.form.recalculate(1);

}

When I go to the Preview PDF tab, it has the table and the button, but clicking the button does nothing.  The warnings tab at the bottom has no errors listed.  Any ideas on why it wouldnt be working?  The table and the button are the only items on the form (testing).

Accepted Solutions (1)

Accepted Solutions (1)

robertr1124947

03-11-2017

Looks like code was written just fine.  Turns out the problem was I was saving the PDF as "Adobe Static XML From" vs "Adobe Dynamic XML Form".  Once I saved it as Dynamic, the table started expanding as expected.  The fun of working with a new product...

Answers (1)

Answers (1)

mouslander

03-11-2017

you are probably not referencing the table properly. Try the following on the click event of your button. You do not need to use the If statement right now. Try to add the row first

Table1.Row1.instanceManager.addInstance(1);