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

Need FormCalc Script for sum of column in Adobe 8 Pro

pdurand
Registered: Aug 9 2007
Posts: 15

I’ll try to make this short, with an emphasis on “try”.

My company has a standard form used by our customers. It is currently an MS Word document. For security and integral reasons, we would like to convert it to a PDF form. To facilitate this, I had Adobe Acrobat 8 Professional installed on my workstation.

Using the “Getting Started…” window that pops up upon opening the program, I imported the Word Document form into Adobe (which apparently uses LiveCycle Designer as the editor).

The jump from Acrobat Standard to Professional was larger than I thought. I have no background or experience with scripting. I can write a bit of HTML code but I usually have to look it up to make sure it is right.

My problem is I need a column of dollar amounts to total at the bottom and can’t get it to work on the client end in Reader. I just need the syntax for the script that will calculate the total for the values entered into a series of objects by the client. Don’t let my use of the vocabulary fool you. I’m totally stumped.

Ordinarily, my company would send me to a class to learn what I need to know. Unfortunately, our instructional vendor has yet to get back to me. Apparently they are having trouble finding someone qualified to teach Adobe 8 Pro. A book might work but time is of the essence here. The “higher ups” would like this form to go live as soon as possible. I’ll take the “do this and type that” shortcut for now and learn the ins and outs when I have more time.

I’m also wondering if it is possible to select and format several objects at once. To select a group of objects I’ve had to hold down Ctrl and click objects one by one. This is the only way I seem to be able to format more than one object at a time.

But that is another issue. The calculation/sum issue is much more of a problem. Oh and the built in function syntax was no help at all on this.

Thanks in advance for any assistance with the problem.

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can create a library of custom field types, see the "Scripting Reference" under the menu bar's "Help" option. This help reference also covers entering and editing form fields and the various script options.

Acrobat Professional sitll has the traditional Acrobat Forms toolbar. I believe you can find it under the menu bar's "Form" option but I do not remember which option. You can also modify the toolbar to include the advance editing tools that inclues the form fields.

George Kaiser

pdurand
Registered: Aug 9 2007
Posts: 15
1. Do I need to adjust the hierarchy of the fields above the field I want the calculation in?

2. Does it matter that I'm workin in LiveCycle Designer? I don't see a Form option.

I've gotten as far as entering a calculation in the script editor but all that does is cause the equation's result to show up when I open the form in reader.

My mind is still clinging to Excel in which you reference other cells in your formula. I have to imagine the syntax and/or script will have to do something similar. How else would the calculation field know what it is to add together.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
1. You may need to set the calculation order not matter which program you use.

2. In the beginning Adobe provided the ability to create PDF forms with Acrobat using the FDF format and JetForms created XML forms that could be displayed as a PDF file. Then Acrobat acquired JetForms and provided Acrobat users of version 6+ Professional to use LiveCycle Designer program to create XML forms or use the Acrobat program's Fromtool to create FDF forms. LiveCycele Designer and Acrobat are 2 separate and distinct programs, but LiveCycle Designer does use the Acrobat plug in to preview the PDF form created by LiveCycle Designer. It should also be noted that forms created by LiveCycle Designer can only be filled in by Acrobat and not designed, but LiveCycle Designer can import a PDF form created by Acrobat but disables the JavaScript, which is not compatible with LiveCycle Designer's FormCalc or JavaScript.

If you are in Acrobat you can force Acrobat to use the forms tool, if you do not select the Formtool option Acrobat launches the LiveCycle Designer program. To use the Acrobat Formtool you must be in Acrobat. Please note that Adobe has added dynamic menus with version 8 that do change based on a previous menu selection.

In Reader, you will only see the results of the calculation since there is not form field editing capabiltiy and if you open the form in Acrobat and use the Formtool you will see some very strange form field names but can not edit the contents.

George Kaiser

pdurand
Registered: Aug 9 2007
Posts: 15
I don't think I asked the right questions. The answer I was looking for (and found in a Google User Group) was this:

SUM(FieldNames[*])

I just had to name all the fields in the column the same thing and enter this script in the last field/object.

Thanks for you help just the same.
Waidesworld
Registered: Oct 2 2007
Posts: 1
I have tried this and am getting nowhere. Can someone help me please? Tell me what you wish to know and I will email it to you, even the form :) I am trying to add a Purchase Requisition Form and have a running total at the end but if I click on teh running total box an error occurs.