Using LiveCycle Designer 8.2
I need to have a table with a header row, 2 static rows, and then be able to insert rows at the end (after the static rows) .
I have this in my Add Button but nothing happens. Not sure how to dynamically add the row to the end after the 2 static rows.
tblOtherStudyMS._Row1.addInstance(1);
xfa.form.recalculate(1);
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Check the attache sample..
https://acrobat.com/#d=KCl5YhmbUKq37Rz48zg9Vw
You need to check the Checkbox, Repeat Row for Each Data Item on the last that you want to repeat multiple times. and then use the instance manager to add rows/ remove rows.
In my screen shot below I am setting the checkbox for Row3 in the Table1.
So my Add button click event code will look like:
Table1.Row3.instanceManager.addInstance(1);
My Remove button click event code will look like:
if(Table1.Row3.instanceManager.count >1)
Table1.Row3.instanceManager.removeInstance(1);
Thanks
Srini
Views
Replies
Total Likes
Check the attache sample..
https://acrobat.com/#d=KCl5YhmbUKq37Rz48zg9Vw
You need to check the Checkbox, Repeat Row for Each Data Item on the last that you want to repeat multiple times. and then use the instance manager to add rows/ remove rows.
In my screen shot below I am setting the checkbox for Row3 in the Table1.
So my Add button click event code will look like:
Table1.Row3.instanceManager.addInstance(1);
My Remove button click event code will look like:
if(Table1.Row3.instanceManager.count >1)
Table1.Row3.instanceManager.removeInstance(1);
Thanks
Srini
Views
Replies
Total Likes
Thanks, that helped me go in the right path. I had a couple things wrong.
I didn't have the Repeat Rows checked, the subform flowed, and I was referring to _Row1. I had all of them named that so instead I left the static one named Row1 and changed the repeating one to Row2.
Views
Replies
Total Likes
You can also use a underscore notation which is a short form for instanceManager..
Both the following are correct..
Table1._Row3.addInstance(1);
Table1.Row3.instanceManager.addInstance(1);
Thanks
Srini
Views
Replies
Total Likes
I did end up using short form. I didn't know what that meant until now though so thanks for that info. I'm a newbie!
Views
Replies
Total Likes
I just posted about now sorting in that table I created if you want another challenge.
Thanks.
Views
Replies
Total Likes
Views
Likes
Replies