Quantcast
Channel: Adobe Community : Discussion List - LiveCycle Forms
Viewing all articles
Browse latest Browse all 1160

Trouble getting past arithmetic over/underflow error

$
0
0

Thanks in advance to anyone that can help out. I've read some forum posts about getting over an error on a LC Designer form for Arithmetic over/underflow that is occurring if a user has not filled out a field yet, so the calculation is trying to divide by zero. I applied some code (javascript below) that has worked for me on all fields I needed it, except for one, and I cannot figure out what I've done wrong.

 

I'm trying to determine a Loan to Value Ratio. I have been able to successfully calculate the field using the following FormCalc code, written on the calculate event of my field named "Asset1LVR":

 

Page4.TotalPropertyTable.Row2.PPROwing/Page4.TotalPropertyTable.Row2.PPRValue*100

 

This is fine and all, but if the user has not yet filled out the "PPRValue" field, then the arithmetic over/underflow error occurs because the value of PPRValue is null.

I have been using a script like this one below on other parts of my form where I was having the same trouble, and the code below works like a charm. For some reason I cannot get this code to work with my Loan to Value Ratio scenario. It is not producing anything in the "Asset1LVR" field at all, so appears to be doing nothing.

 

This what I am using, written on the calculate event of "Asset1LVR" and Language is set to Javascript:

 

if ( Page4.TotalPropertyTable.Row2.PPRValue >0) then

 

     Page4.TotalPropertyTable.Row2.PPROwing / Page4.TotalPropertyTable.Row2.PPRValue * 100

 

endif

 

How come the FormCalc version works to calculate, but the JavaScript doesn't?

 

Any help is much appreciated, thank you.


Viewing all articles
Browse latest Browse all 1160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>