0 Replies Latest reply on Jun 2, 2011 6:36 AM by jscotti

    Out of Memory

    jscotti Level 1

      I have a form field that can have new instances created on it. So there may not be any or there could be 10.

       

      In the JavaScript I have the following code:

       

      if (bNum.rawValue != null) {
          var testBNumber = Page1.commonScripts.isNumeric(this.rawValue);
          if (testBNumber == true){ //IS NUMERIC
              bNumChecker.rawValue == "";
              var address = Page1.commonScripts.getServerName() + "soap/services/FORM/FORM1/SubProcesses/QueryNumber";
              xfa.connectionSet.NumberPrefill.soapAddress = address;
              xfa.connectionSet.NumberPrefill.wsdlAddress = address + "?wsdl";
              xfa.connectionSet.NumberPrefill.execute(0);
              if( bNumChecker.rawValue == "false" ){
                  txt5.presence = "visible";
                  completeCheck.rawValue="false";
                  bNum.font.fill.color.value = "255,0,0";
                  app.alert("Invalid Number. Please re-enter a valid number.");
              } else {
                  bNum.font.fill.color.value = "0,0,0";
                  txt5.presence = "hidden";
              }
          }else {    //NOT NUMERIC
              txt5.presence = "visible";
              completeCheck.rawValue="false";
              bNum.font.fill.color.value = "255,0,0";
              app.alert("Invalid Number. Please re-enter a numeric value.");
          }
      }

       

       

      Where I am on the form, this works fine. No issues.

       

      They I have on the Complete Button:

       

      if (docsIncluded.rawValue=1){
          Extras.bNumbers.bNum.execEvent("exit");
      }

       

      The intent is to have the field checked while your in the form,. but to also do a "last check" when the user hits the complete button in Workspace. However, most of the time I am getting an out of memory error.

       

      Does anyone have any suggestions?

       

      Since, this is a multiple instance field, do I need to loop through the nodes and check each one instead of calling the exec procedure?