Acrobat User Community Forums

You are not logged in.     Log in to your AUC account.     Don't have an account? Sign up today

#1 2007-10-31 11:51:47

djfixxx
Member

Registered: 2007-04-30
Posts: 0

Spawned page calculations

I am having an issues with spawned page calcs but have not seen a working formula. can you help with a working formula.
I basically have QTY + Price = Amount calc and then a simple amount.1 + amount.2 = total


My Product Information:
Acrobat Pro 8.1 / Windows

Offline

 

#2 2007-10-31 16:01:56

thomp
Member

Registered: 2007-04-23
Posts: 727

Re: Spawned page calculations

Since you mention spawned pages, then I'm assuming you are working with AcroForms.  A spawned page can be set up to either rename the fields, which is the right way to do it.  All the the fields on a page are renamed in the same way, with a prefix using a dot notation.  All the calculation script needs to do is to determine what the field prefix is for the page, and it can do this by examining it's own name.

For Example:

// split field name on dots.
var aName = event.target.name.split(".");

// remove the original name
aName.pop();

// Build Prefix
var prefix = aName.join(".");

// Do Calculation
event.value = this.getField(prefix + ".QTY") * this.getField(prefix + ".Price");

Of course if you are tolking about dynamic xfa forms the process is very different.

Offline

 

#3 2007-11-01 11:26:46

djfixxx
Member

Registered: 2007-04-30
Posts: 0

Re: Spawned page calculations

I dont quite get it. I guess I cannot use Simple Calculations. Am I forced to use Javascript when soing this?
I posted the PDF here if you could help.

http://www.rockndj.com/PurchaseOrder-Pu … equest.pdf

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

AcrobatUsers.com  >>  User Groups • News • Events • Articles • Blogs • How To • Resources • Member Log in