Trouble getting past arithmetic over/underflow error

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.

I managed to come across the answer in another post I missed earlier (REPOST - "Arithmetic Over / Underflow" Error). I've changed my code to what is shown below, and seems to work perfect. Hopefully someone else will find this useful.
// check for divisor having a value and not zero
if
(HasValue(Page4.TotalPropertyTable.Row2.PPRValue) and Page4.TotalPropertyTable.Row2.PPRValue <> 0) then
// perform division
Page4.TotalPropertyTable.Row2.PPROwing
/ Page4.TotalPropertyTable.Row2.PPRValue
* 100
else
// display nothing
endif

Similar Messages

  • Can you help with an arithmetic over/underflow error?

    I have learned that the '0' or null value is the problem and I have fix it in a couple of instances such as:
    if  (TotalBreakdown>0) then (Breakdown5/TotalBreakdown) endif
    Now I have a more complex situation that will not work.  This is the best I could do with this one and now I am having an issue with the '100'.
    if ( ContractAmt >0 and ReimbFee > 0 ) then (ReimbFee/ContractAmt)* 100   and it returns error below.
    I am sure it is an easy fix but indeed one that escapes me and I have not been able to find a solutions.
    Thank you in advance for any help I can get.

    Is that the entire script? I any case, you should post this in the LiveCycle Designer forum.

  • Asking too much and getting a "stack over flow error"

    I’m having AS3 create 12 random var (play1, play2, etc) and then I ask it to average the 12 vars (numbers) until I get a specific average number. When I run this in AS2 I get the “script time error, keep running?” question. I tell it to keep running and eventually AS2 finds the right set of 12 numbers to equal a specific average number. In AS3 I get a “stack over flow error”. I know that all my AS3 swf needs is just more time to find it.
    Any ideas for a fix?

    // set AvgLenght if it is undefined
    if (!AvgLenght) {
        var AvgLenght:Number = 4.5;
        ShowAvgLenght.text = String(AvgLenght);
    // build play lengths//
    var Hteamplay1:int = Math.random() * 5;
    var Hteamplay2:int = Math.random() * 5;
    var Hteamplay3:int = Math.random() * 5;
    var Hteamplay4:int = Math.random() * 5;
    var Hteamplay5:int = Math.random() * 10;
    var Hteamplay6:int = Math.random() * 10;
    var Hteamplay7:int = Math.random() * 10;
    var Hteamplay8:int = Math.random() * 10;
    var Hteamplay9:int = Math.random() * 20;
    var Hteamplay10:int = Math.random() * 20;
    var Hteamplay11:int = Math.random() * 50;
    var Hteamplay12:int = Math.random() * 100;
    trace("12 play sets", Hteamplay1, Hteamplay2, Hteamplay3, Hteamplay4, Hteamplay5, Hteamplay6, Hteamplay7, Hteamplay8, Hteamplay9, Hteamplay10, Hteamplay11, Hteamplay12);
    var playsum:Number = (Hteamplay1 + Hteamplay2 + Hteamplay3 + Hteamplay4 + Hteamplay5 + Hteamplay6 + Hteamplay7 + Hteamplay8 + Hteamplay9 + Hteamplay10 + Hteamplay11 + Hteamplay12);
    var PlaySets:Number = playsum / 12;
    trace ("Average of all plays:", PlaySets)
    if (PlaySets >= AvgLenght && PlaySets <= AvgLenght + .1) {
        gotoAndStop("Equals target avg");
        ShowAvgLenght.text = String(AvgLenght);
    } else
    nextFrame();
    // The next frame "goes to and plays this frame
    // ShowAvgLenght.text = String(AvgLenght);
    trace("AvgLenght:", AvgLenght);
    the code work with higher "AvgLenght",a lower "AvgLenght" takes longer and I get the below error:
    output:
    12 play sets 2 2 2 1 0 3 0 7 16 16 25 17
    Average of all plays: 7.583333333333333
    AvgLenght: 2
    tried: 3489
    12 play sets 0 4 4 0 3 4 1 2 19 9 10 30
    Average of all plays: 7.166666666666667
    AvgLenght: 2
    Error: Error #1023: Stack overflow occurred.
    tried: 3490
    Error: Error #1023: Stack overflow occurred.
    Error: Error #1023: Stack overflow occurred.

  • Trouble getting past purchases to new IMAC

    We recently purchased an IMAC and I am having trouble getting our past purchases to it. Our old computer is toast and last time we synced only got about 30 songs. I have authorized the new computer and searched for available downloads. I can see the past purchases in the store but cant get them on the new computer. Can any one help?

    Downloading past purchases from the App Store, iBookstore, and iTunes Store - http://support.apple.com/kb/ht2519 - enabled with iTunes 10.3 and newer; not available in all countries; only apps, books (not audiobooks), music, and t.v. shows (not movies).  Discontinued items not available. For items not included in the iCloud list, or locations or computer systems where iCloud is not (yet?) available, you only get one download per fee paid.  Apple notes it is your responsibility to back up your purchases.

  • Can't get past a "locked file" error, ie can't Publish?

    This software is very very very difficult to configure -- but
    I'd suppose you've heard that before re: Contribute C3. This is
    trying to get a new client (we're a web hosting co, who just got
    them from their previous web hosting firm who sold them on
    Contribute....idiots!) Anyways, I've had NOTHING but troubles with
    this app.....
    I learned how to operate the app, and how to generate a KEY
    to send to the new client, and made them an Admin and sent same and
    then went over there to their offices. My client rec'd the CONN KEY
    that I made. We ran it on their computer when prompted to by
    Contribute. we then restarted with them now as an Admin. Working at
    their offices, I was able to connect, then edit a page on their
    website no problem -- BUT -- as soon as I tried to PUBLISH same,
    you get a yellow bar up top that says "You can't edit this page now
    becuase you are already editing it on another computer. Click here
    to make this page editable" WTF???????????
    This statement is wrong. No one else (other than me and my
    computer is OFF) has the abiltiy to edit that page. No one else has
    the credentials to enable Con to work on that client site
    either...so....?????
    I then click the 'here' and I get the notice that Contribute
    must unlock the page (stupid non professional app!!!) and I then
    try YES, and I get the dialog that says "no, access is denied or
    there may be a permission problem."
    This too is not correct. I personally made the perms for the
    whole website folder structure read/write and they work fine. I can
    use my own CMS system to login and make a change that works
    perfectly.. But not using Contribute....sigh....and that client
    WANTS to use Contribute....sigh....
    Could someone offer help here? Adobe Tech support in some
    other country doesn't seem able to understand my problem, let alone
    help, let alone feel any sense of urgency as this is a CLIENT for
    christsakes.....anyways...here's my questions...
    Is there a way to totally CLEAR all the settings on the
    client machine Contribute, then re-use the KEY to begin a new Admin
    role? I'm a bit fearful of deleting that website but if someone
    here who's NON adobe personnel says okay, that'd be my next step.
    Or do I need to uninstall from my own box too?
    Or, is there a way to fix this, without that deletion? I'd
    feel better about another way....but no matter. My client only has
    one eyebrow raised up at me right now, but if I don't come up with
    an answer tomorrow, that client will most likely be gone!
    Help here someone?
    Jim

    Hi, try clearing the Contribute Preferences once and try the
    same scenario. Check any .LCK file is created for that particular
    page. Delete that file manually and make it editable.
    To Clear the preference, quit Contribute, and then delete the
    Contribute CS3 folder in C:\Documents and
    Settings\<user>\Local Settings\Application Data\Adobe\ and
    also run the following command " reg delete
    "HKCU\Software\Adobe\Contribute 4.1" /f " if you are using
    Contribute CS3. Reconnect to the site and try the same scenario.
    Note that, if you clear the preferences then no connection
    will be listed in Contribute, you need to recreate the connections.
    It will be like a fresh installation.

  • How do I get past the (-50) download error

    I can not dowload from ITunes. I receive the error message THERE WAS AN ERROR DOWNLOADING YOUR PURCHASED MUSIC. AN UNKNOWN ERROR OCCURRED (-50). Based on everything I have read, there is an internet block. I ckd wdws and it shows Itunes being cleared. I think I disabled by Norton but nothing. Any ideas of what internet block to look for?

    Have you read this?
    iTunes for Windows: An unknown error occured (-50)

  • Trouble getting past software license agreement

    I just recently bought an ipod and have accepting the software licensing agreement on my computer several times and each time I agree, the screen goes away and nothing else pops up.  When I try to go into itunes afterwards, I get the license agreement again.  Any suggestions on what I should do?

    Open the Control Panel in Windows or System Preferences in Mac OS X, click on Displays, and increase the number of pixels displayed on the monitor to at least 1024 by 768.
    (27606)

  • HT204306 so my screen is not working so i cant put in my passcode and the apple store said i need to do a reset to factory settings.. having trouble getting past my passcode

    my screen stoped working and the apple tech said I need to restore, but I need to put in my passcode to do that. also tried recovery mode.

    What happened when you tried Recovery Mode?

  • FormCalc error-arithmetic overflow/underflow

    Does anyone know how to get rid of the arithmetic overflow/underflow error? I have a form with calculated fields that works, but I get this error every time I open it. I really don't want to send it out to customers like this. Any suggestions?

    Since it is occurring when the form is first openned I'd look for some calculations (particularly division) that are being done in form load/field initialization/field change events. You could add some "message box" display of field names, event name and variable values at the beginning of the events that have calculations to determine which one(s) are running at form load time and what the values are.
    My guess is that it is being triggered before one or more of the variables has a value in it. If that is the case, you will want to surround your calculation with a check to ensure that the variables are non-zero, non-null. You may even want to go as far as not running the calculation until after you know the form has been completely loaded and fields are initialized by establishing a variable that isn't set until the end of the form load process.

  • Changed my exchange email on work computer (req. every 3 months), now I can't get past incorrect password error on iPad.

    I'm required to change my exchange email password every 3 months on my work computer.  Now I can't get past the incorrect email error on my iPad.  It won't accept my new or old exchange password and won't let me get past the error to do anything else on my iPad.  Hitting cancel doesn't help, the error just comes back a second later, so my iPad is useless for anything else and I can't get to Settings to either enter the new password for the account or delete and re-enter the account. Is there some kind of soft reset I can do? Any other suggestions?

    I saw some other posts on the web and completely powered off of the iPad.  Then turned it on again and was able to quickly go to Settings and update the password.  So this is no longer an issue for me.  Just a pain that this is what I'll have to do every three months when I have to change my exchange password again.

  • Arithmitic Over/ Underflow

    I keep getting a error message with Arithmetic Over/ Underflow as the reason. I am dividing a smaller number by a larger to get a percentage. My formula looks like this sum(form1.#subform[5].NumericField13[1]/form1.#subform[5].NumericField18[0])
    Basically this is a loan amount divided by a value to get a Loan to Value %.
    Any help?

    At any time is the "form1.#subform[5].NumericField18[0]" blank or equal to zero?

  • Can't get past setup assistant after installing leopard...

    i am having trouble getting past the setup assistant after installing leopard on my other computer which is a 1.25 ghz G4 desktop. Everything seems to be going fine then the setup assistant comes up and i go through the exercise of filling it out and at the end it says click on done and then you can use the computer. unfortunately it goes right back into the setup assistant like i had never gone there before. it is in some kind of loop. would it be wise to reinstall leopard? if so, does it know that it was installed already and rewrite over the first install? or is there something else i may try. i tried resetting the PRAM and some other things recommended but nothing seems to work. any help will be appreciated.
    thanks in advance...

    mr_magicman,
    I can imagine how frustrating this must be for you. It sounds like you went for the (default) Upgrade option.
    Okay, how about trying this:
    1. With the *OS X 10.5 Install Disk 1* still in the bay, Restart your computer. Without access to menus, you'll have to use the power switch to turn it off. +[Alternatively, if you do have access to menus, select the Restart command (in the Apple menu) — always the preferred method.]+
    2. If you're using the power switch method, here, wait about 10 - 15 seconds then depress the power switch again for about 5 full seconds (or until you hear the computer come back to life). +[Alternatively, if you had selected the Restart command in Step 1, the computer will start up again on its own.]+ *Either way, as the computer starts up, press and keep pressing, the Mouse until the disk ejects.* By the way, if you're using a Mighty Mouse with a left and right option, press down on the left side only. Hopefully this will get you out of the loop caused by your Install DVD remaining in the drive.
    Finally, to be fair to you, I must tell you that there's a more suitable Forum for your particular kind of problem, viz., *Installation and Setup* (http://discussions.apple.com/forum.jspa?forumID=1219) I recommend you check out the questions/answers in that Forum in case your question has already been asked and answered.
    PS. If you do re-post your question in that Forum, don't forget to mention whether or not you internal hard disk has been backed up.
    GOOD LUCK!
    Bill

  • ITunes Match won't get past Step 1

    Hi,
    I know a lot of people are having trouble with getting past Step 2 at the moment in iTunes Match, but I was just wondering if anyone else was having troubles getting past Step 1? Last night, even just trying to match one song, I was stuck at Step 2, but this morning, it's not even getting past Step 1 (when it had always previously done this very fast), just saying "Sending information to Apple" forever! Just wondering if anyone else had experienced this. Thanks!

    I have the same problem. Neither Genius nor iTunes Match will get past Step 1. They have worked in the past so there must be some hang up with added music or a change in the backend.
    I have tried deleting iTunes Library Extras.itdb and iTunes Library Genius.itdb, and while this does cause the process to restart it doesn't allow it to complete.
    Help!

  • I am have trouble getting music I have already purchased in the past to transfer to my phone after I did an update.  The music is there and I can see it but it cannot be played when the music is put on shuffle. It just skips right past it? How do you fix?

    I am having trouble.getting music that I have purchased in the past to transfer to my phone after I did recent update on the phone. I can see the music, it is in a lighter font and appears to still be there but will not play.  When placed on shuffle it will skip right over this music. I have already paid for this music and have been able to play it at one time but that was before the update. Why can I not listen to this music anymore?

    Did you ever resolve the iCloud problem.I am in the same position and its driving me mad!!! If you have a link to an solution I would appreciate it.

  • TS5376 I just attempted to update my apple iTunes to 11.1.4 which resulted in the msvcr80.dll error message. I followed all of the instructions above and now I can't get past the Service 'Apple Mobile Divice failed to start. Help!!!

    I just attempted to update my apple iTunes to 11.1.4 which resulted in the msvcr80.dll error message. I followed all of the instructions to move the .dll's to the desktop, I removed iTunes via the control panel, and now I can't get past the Service 'Apple Mobile Divice failed to start. Verify that you have sufficent privilidges to start systems services. I now have no iTunes on my laptop, can't reinstall iTunes, and I am pulling my hair out because I can not figure out how to send an e-mail to Apple because I bought my iPad just over a year ago. PLEASE HELP!!!
    V/r "TRACER"
    CDR Harold W. "TRACER" Valentine, SC, USN

    Solving the iTunes Installation Problems in Windows
    1. Apple has posted their solution here: iTunes 11.1.4 for Windows- Unable to install or open - MSVCR80 issue.
    2. If the Apple article does not fully resolve the problem for you, then try Troubleshooting issues with iTunes for Windows updates - MSVCR80.

Maybe you are looking for

  • How does Fetch Rx Data works?

    Dear Sir or Madam, I have a problem when I am implementing MAC protocols by using LabVIEW and USRP2. Actually there are two problem, I will show them in a simple CSMA protocol. The first design is that in CSMA protocol, node 1 sent a data packet to n

  • Unable to recover Mac OS

    I am currently trying to recover the OS on an old Macbook. When I book up the mac I get the flashing folder with a question mark. I have booted in internet recovery mode but it only gives me the option to recover Mac OS X Lion 10.7 but I have purchas

  • Payslip to PDF and email

    Hi Friends, I have a requirement where we need to generate differerent PDF files for employee salary slips. These generated PDFs would then be emailed to individual employees (email id stored in IT 0105). In one of the threads ( Payslips to be conver

  • SRM 7.0 - CRM middleware settigns for material replication

    Hello SRM Guru's Can you please provide me detail step by step process of CRM middleware settings for material replication from ECC 6.0 SRM 7.0? Thanks. Regards, Magesh.

  • HELP SQL!moving the curser to the next row

    after i update a row in that database using PreparedStatement updatetable = con.prepareStatement( "UPDATE Login SET LogIn ='" + cTime + "',UserId = '" + username + "' "); the row was updated correctly,when i run the application again and enter a new