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

I need help with a really simple subtraction in livecycle, thanks you!

rligeti
Registered: May 21 2009
Posts: 9

I have a financial doc that has total income (field name is "undefined_9") and total expenses (field name is "undefined_29") and cah flow (field name is "undefined_30"). I need to get the "undefined_30" field to calculate/display undefined_9 - undefined_29

Thanks in advance for any help!

Best,
Rob

PS, i dont really know jack about java... (yet)

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
First, you really ought to give your fields more descriptive names.

Have you read about FormCalc? Look it up in the LiveCycle help docs. And there is a FormCalc reference and other helpful materials at:
http://kb2.adobe.com/cps/330/330467.php

FormCalc is the simple scripting language for LiveCycle forms. To use it you would enter exactly the subtraction code in your post above into the Calculate event for "undefined_30".

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

rligeti
Registered: May 21 2009
Posts: 9
I tried that and it's not working (formcalc - there's no subtract function in formcalc). I also tried cutting and pasting some javascript I found and modifuning it with my field names... The two cells I'm tring to subtract are also based on form cals "sum" calculations. Is that a problem? Each is an addition of several other form fields.

Thanks,
Rob
rligeti
Registered: May 21 2009
Posts: 9
wow, that was super easy... Justn like you said i did a - b = C and it was perfect, no code really even needed. Thanks! I was trying to make it too complicated.

Best,
rob