Hello everyone!!!!!
I am trying to figure out how to repeat a row when I click a button inside a subform. I want the row repeated and added to the table inside the subform. How can I do this? I also want to be able to add the numeric value of one of the cells in the generated row to a total. I've tried the instanceManager though can't figure out how or if this is even the correct way to go at this one at this point. Any help is greatly appreciated on this my new quest
Justin
Solved! Go to Solution.
Views
Replies
Total Likes
Sample is here..
https://acrobat.com/#d=NG2Sc*iKU6WmNdIiJ72aeQ
You need to check the Repeat data for each row checkbox in Row1 properties.
Save the PDF as Dynamic file..
1) Goto File menu -> Form Properties and select Defaults tab. Change the Default Render Format as Dynamic XML form
2) Select the Preview Tab. Set the Preview type as "Interactive Form" and Preview Adobe XML form as Dynamic XML form
3) Finally while saving the PDF select Save As Type as "Adobe Dynamic XML Form".
Use the below command in click event of button..
Table1.Row1.instanceManager.addInstance(1);
Thanks
Srini
Views
Replies
Total Likes
Sample is here..
https://acrobat.com/#d=NG2Sc*iKU6WmNdIiJ72aeQ
You need to check the Repeat data for each row checkbox in Row1 properties.
Save the PDF as Dynamic file..
1) Goto File menu -> Form Properties and select Defaults tab. Change the Default Render Format as Dynamic XML form
2) Select the Preview Tab. Set the Preview type as "Interactive Form" and Preview Adobe XML form as Dynamic XML form
3) Finally while saving the PDF select Save As Type as "Adobe Dynamic XML Form".
Use the below command in click event of button..
Table1.Row1.instanceManager.addInstance(1);
Thanks
Srini
Views
Replies
Total Likes
Ok so I can't upload a file so here is a link to the file I am working with:
http://www.shingleme.com/ExpenseForm4_29_10.pdf
i am trying to get the button to work but for the life of me I can't duplicate what you are doing.
Here is what I used:
foodDrinkTable.Row1.instanceManager.addInstance(1);
On the click event but nothing is happening.
Justin
Views
Replies
Total Likes
I'm such an IDIOT!!!!! I missed the check the repeat in row properties....LOL Thank you for your help it works now...but I still need to know how to add a field that isn't generated yet to a total??????
Justin
Views
Replies
Total Likes
if you want a total of a field from the repeating row, you can write the code in the Calculate event of the field..
For example if I want to display the Total of Amount from Row1 into "Food and Drink Total" Field, you need to write the code like this..
In Calculate event of the "Food and Drink Total" Field, Language: FormCalc
Sum(foodDrink.foodDrinkTable.Row1.amount[*])
Where amount[*] will represent all the amount fields in the Row1.
Thanks
Srini
it is only adding the first row then. How do I get it to add each row that I add??
Views
Replies
Total Likes
Sorry mistake in the code I gave you.. In your form, Row1 is repeating so you need to put the [*] after Row1 instead of amount..
Sum(foodDrink.foodDrinkTable.Row1[*].amount)
Thanks
Srini
Ok so how would i delete the last row i created. i know how to do it with a subform using removeInstance but can't figure out how to remove the last row i created???
Views
Replies
Total Likes
The below code will remove the last added
//Make sure one row will be available all the time
if(foodDrinkTable.Row1.instanceManager.count>1)
foodDrinkTable.Row1.instanceManager.removeInstance(foodDrinkTable.Row1.instanceManager.count-1);
If you want to remove a specific Row then you need to pass the index of that Row to the removeInstance method. The index started with 0.
Thanks
Srini
Views
Replies
Total Likes
That is PERFECT!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thank you very much for all of your help today. I learned a TON TODAY and really appreciate all the help!!!!!!!!
Justin
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies