These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Spawned page calculation

resumeready
Registered: Aug 8 2006
Posts: 2

I am spawning a page and need to have a simple calculation script (sum of multiple fields) in a "Total" field. This is what I have so far:
var amount = "P" + (this.numPages - 1) + ".templatename.fieldparentname";
var sum = 0;
for (var i=0; i < 27; i++) { var total = amount +"." + i; sum += Number(this.getField(total).value); } event.value = sum;
 
It works on the template without the precursory "P" + (this.numPages - 1) + ".templatename., but will not work on the spawned page.

Robert Woodward
Crime Analyst
Chico Police Department
Chico, CA 95928

My Product Information:
Acrobat Pro 8, Windows
tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
i

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.

tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
i

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.

djfixxx
Registered: Mar 22 2007
Posts: 111
Can you elaborate on this more as I am trying to get calculations to work on spawned tempplates too.

It professional, networking, technical, graphical, imaging, froms.

tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
I think the fastest way to get an answer is to contact Thom Parker. He can run the problem down much faster than I. It would take me a lot more time to solve the problem than Thom.

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.