3 Replies Latest reply on Aug 11, 2014 6:16 AM by try67

    Condition and Result not executing - enable button when a value is equal or greater


      Hi everyone,


      I posted this in the LiveCycle Designer forum but since (I think) it is essentially a javascript question, I wanted to post it here as well - hope that is alright.


      I almost have this working but I'm missing something. I have a numeric field that contains a grand total that is fed from four other numeric fields. When the grand total is greater than or equal to 400 the Result: is to set a "submit by email" button to enabled (when the pdf first loads, I have an action that disables the "submit by email" button).


      However, when the grand total field totals 400, the submit button does not enable. But, if I put the cursor in the grand total box when it has a value of 400 and the I hit the enter key, the submit button becomes enabled! (If i ever get this working I want to visually hide this grand total box from the user).


      What "piece of the puzzle am I missing?"


      Here is the code that is generated:


      //+ GENERATED - DO NOT EDIT (ID:5C63BB92-97FF-4018-A1FE-FFB114A0814B CRC:2411975672)

      //+ Type: Action

      //+ Result2: SetEnabled("$Node2","open")

      //+ Result1: ShowDialog("information","You have met your Orientation requirements. You may now submit this form.","Congratulations!")

      //+ Node2: form1[0].SFContainerPage3[0].SigArea[0].EmailSubmitButton1[0]

      //+ Node1: form1[0].SFContainerPage3[0].TotalforValidation[0]

      //+ Condition1: NumericField("$Node1","greaterThanOrEqualTo","400")

      //+ ActionName: TotalforValidation.exit

      if (this.resolveNode("$").rawValue >= 400) {

        xfa.host.messageBox("You have met your Orientation requirements. You may now submit this form.", "Congratulations!", 3);

        oTargetField = this.resolveNode("SigArea.EmailSubmitButton1");

         oTargetField.access = "open";





      Thank you very much for your help and time.


      Best Regards,