This content has been marked as final.
Show 10 replies

1. Re: Calculations  Rounding problems
George_Johnson Aug 5, 2008 2:02 PM (in response to (Terry_Secor))How are you rounding those other values to the nearest dollar in the first place, and how are you setting the field values?
George 
2. Re: Calculations  Rounding problems
(Terry_Secor) Aug 5, 2008 2:33 PM (in response to (Terry_Secor))As for the rounding, I'm using the text field poperties. I select the format tab and select the number category and select no decimal place.
I start off typing in the beginning balances. Then they go through various basic calculations (addition, subtraction, & multiplication). I set these up using the calulate tab in the text field properties. I hope that answeres your question. Thanks again 
3. Re: Calculations  Rounding problems
gkaiseril Aug 6, 2008 6:28 AM (in response to (Terry_Secor))The text field properties only change the value for display not computations. If you want the field value to be rounded for later computations you will need to write a rounding calculation. You can either use the "Math.round()" of JavaScript or the "util.printf() of Acrobat JavaScript. Since you will most likely be using this many times it would be best written as a document function. 
4. Re: Calculations  Rounding problems
(Terry_Secor) Aug 6, 2008 7:48 AM (in response to (Terry_Secor))Can you give me an example of how to write the script for that. I've tried the Math.round() but I've been unsuccessful. Basically I'm trying to write Math.round(Text#)+Math.round(Text#). Is there supposed to be more script before or after Math.round() to make it work properly? I really do appreciate your help. 
5. Re: Calculations  Rounding problems
gkaiseril Aug 6, 2008 8:10 AM (in response to (Terry_Secor))If you are using LiveCycle Designer FormCalc:
// sum the rounded values of the field's Text1 and Text2 rounded to whole dollars
Round(Text1, 0) + Round(Text2, 0)
If you are using Acrobat's form foields, the custom script for the same example would be:
event.value = Math.round(this.getField("Text1").value) + Math.round(this.getField("Text2").value); 
6. Re: Calculations  Rounding problems
(Terry_Secor) Aug 6, 2008 9:31 AM (in response to (Terry_Secor))Awesome!!! Problem resolved. Thanks a ton for the help. I really appreciate it. 
7. Re: Calculations  Rounding problems
yogarajg42234899 Mar 13, 2018 3:20 AM (in response to (Terry_Secor)) 
8. Re: Calculations  Rounding problems
try67 Mar 13, 2018 4:39 AM (in response to yogarajg42234899)1 person found this helpfulWhy do you want to do it in LCD? It's much better to use Acrobat.

9. Re: Calculations  Rounding problems
yogarajg42234899 Mar 13, 2018 5:29 AM (in response to try67)Hi.! I'm new to Learn adobe live cycle, currently i'm working in Pvt company.so they Can give me a Task (Amount calculate then that amount calculate to added in total Amount). my self i try so many ways but did not get it answer.so i'm asking you.!Pls Explain me with screen Shot.
here using variable or without variable.?

10. Re: Calculations  Rounding problems
gkaiseril Mar 13, 2018 9:38 AM (in response to yogarajg42234899)1 person found this helpfulLiveCycle can use a variation of Acrobat JavaScript as well as another language, FormCalc, see the LiveCycle forms for more help.
Adobe has LiveCycle Learn & Support and LIVECYCLE IN THREE DAYS VIDEO TRAINING which provide training.