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

Calculated Fields

jay333
Registered: Dec 21 2010
Posts: 2

I am having some trouble getting my calculated fields on a form to show/calculate. In particular, I have 2 dates on the form ('start' and 'end'). I want the user to enter the 'start' date but want the form to calculate and display the 'end' date as 10 days later. Obviously, i want the 'end' date to refresh whenever the 'start' date is entered/changed.
 
Is it best to use formcalc or java. Actually, using formcalc I can't get a sum calculation on another area of the form to show the calculation unless the form is opened in acrobat. If opened in reader, the calculated field does not appear to work (show the sum).
 
Any help is greatly appreciated. Thank you.

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Java is a stand alone programming language. Acrobat and LiveCycle can use JavaScirpt which is not a language but a script that only runs within a given application.

Have a look at the 'Scripting Reference' under LiveCycle Designer's 'menu bar help option. Look for the 'Date2Num" and 'Num2Date" functions. Note that the format of the date fields is extremely important for converting the special date character string to a number. Once you get the start date converted to a number (the number of days since the Epoch date for all dates) you can add the number of days and then convert that number back to a formatted character date string.

George Kaiser