Expand my Community achievements bar.

Removing and adding back last row in table

Avatar

Level 2

I have a form with a table and dropdown list.  The number of rows in the table is set to whatever the number value is in the dropdown list.  It works fine but when the user selects zero the last row is removed and it is not added back when a non-zero number is selected.  I want the user to be able to select zero as an option to show no rows.  How do I make it so the rows reappear when a non-zero number is selected.  

Here is the code I have in the change event of the dropdown:

var iRows = xfa.event.newText;

TravelPlans.TravelTable.TravelRow1.instanceManager.setInstances(iRows) ;

5 Replies

Avatar

Level 2

Hi,

Don't use instanceManager when you set the row number equal 0.

Please see the code below.

var iRows = xfa.event.newText;

TravelPlans.TravelTable._TravelRow1.setInstances(iRows) ;

Cindy

Avatar

Level 2

Hi Cindy,

Are you saying to not use the instance manager only when the row number is equal 0. I cannot seem to get this to work. I have attached the PDF file I am working on.

Thanks,

Paul

Avatar

Level 2

Hi Paul,

Have you posted attached on Adobe website? I did not see it.

Thanks,

Cindy

Avatar

Level 2

Hi,

The form is fixed.  To view the file, please click on the link below:

Monthly Report Form 2013a_fixed.pdf

https://files.acrobat.com/preview/883609be-bdb2-422e-a22c-5773ff15a432

Cindy