Trouble getting a past more arithmetic / underflow error

Thanks in advance to anyone who can help. I read a few forum posts to get on an error on a form of LC Designer for arithmetic / excess of precision that occurs if a user has not filled a field yet, so the calculation tries to divide by zero. I applied a JavaScript (below) that has worked for me on all areas, I needed it, except for one and I can't figure out what I did wrong.

I am trying to determine a Ratio prepared value. I was able to correctly calculate the field using FormCalc, written following code on my field named "Asset1LVR": calculate event

Page4.TotalPropertyTable.row2.PPROwing/page4. TotalPropertyTable.row2.PPRValue * 100

It's nice and all, but if the user has not yet filled the "PPRValue" field, then more arithmetic / overflow error occurs because the value of PPRValue is null.

I've been using a script like this one below on other parts of my form where I had the same problem, and the code below works like a charm. For some reason I can't get this code to work with my loan to value Ratio scenario. It does not produce what anyone in the field "Asset1LVR" at all, so does seem to do nothing.

What I use, writes on the calculate event of 'Asset1LVR' and the language is set to Javascript:

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

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

endif

How is the version FormCalc strives to calculate, but JavaScript does not work?

Any help is much appreciated, thank you.

I managed to come across the answer in another post, I missed earlier (REPOST - error "arithmetic over/Underflow"). I changed my code to what is stated below and seems to work perfectly. I hope that someone else will find it useful.

Check for divider having a value and not zero

If

(HasValue (Page4.TotalPropertyTable.Row2.PPRValue) and Page4.TotalPropertyTable.Row2.PPRValue <> 0) then

perform a division

Page4.TotalPropertyTable.row2.PPROwing

/ Page4.TotalPropertyTable.Row2.PPRValue

* 100

on the other

Displays no results

""

endif

Tags: Adobe LiveCycle

Similar Questions

Maybe you are looking for