In LiveCycle Designer's menu bar look under the "Help" option there should be a "Scripting Reference" that includes information about entering scripts. Also there are many predesigned templates that have examples of calculation scripts. There are also on demand eSeminar videos on the Acrobat Users Community site, http://www.acrobatusers.com/ .
You can also use the "Sum()" function to add a series of fields:
Sum(field1, field2, field3)
>You would type in the script field:
What I've actually got is:
field1 field2 field3 field4
fields 1, 2 and 4 get user-entered values, field3 is the sum of them.
>Make sure that you are using the script in FormCalc and that the >calculate button is shown on the field to your left of the script >field.
I've got it set for FormCalc, but I have no idea what you're talking about with the calculate button???
The function name is "Sum()", all function names, methods, field names, etc are case sensative.
Try the following in the "Calculation" script section of field3:
Sum(field1, field2, field4)
You want all the field names within the parameter list for the Sum function so empty or non-numeric fields are treated as being zero and not undefined or anything else.
Sorry to seem(?) overly dense, but just exactly *how* do I enter this:
>Try the following in the "Calculation" script section of field3:
>Sum(field1, field2, field4)
I have NO idea where I'm supposed to put this. Does it somehow go in the Palette, or what???
What if I were to re-create this document in Excel (with which I'm a LOT more familiar), complete with all the formulae I require - is there a way to import it "lock, stock, and barrel" into Acrobat and thusly kick out a properly-working document???
Have you looked at the eSeminars on demand I have linked to or the "Scripting Reference" under LiveCycle Designers help?
You have to have the "Script Editor" open in LiveCycle Designer, and select the "text3" field, set the binding for this field as "read only, calculated", and cut and paste the script into the "Calculation" event for the "text3" field.
Brian, send me an email and I'll be happy to help: email@example.com