1 Reply Latest reply on Sep 23, 2014 2:19 PM by jnicholas330

    Why is my code not working?

    lpianwi

      @Hi,

      I am having problem why the else part of this script is not
      working. Is there something I am doing wrong. See code below placed on Click
      event.

      if((CB3.fillColor ="125,125,125") &&(CB5.rawValue=="1")){

          CB6.rawValue=0;

         xfa.host.messageBox("This report is inconsistent, the Rater and
         Senior Rater have stated different opinions on the promotion potential of this
         Soldier. The Reviewer should discuss the assessment differences between the
         Rater and Senior Rater. If both rating officials elect to leave the report as
         written, the reviewer will “non-concur” this report based on the inconsistent
         assessments.", " ", 1);

        }

        else if((CB4.fillColor = "128,255,0") && (CB5.rawValue=="1")){

        CB6.rawValue=0;

      xfa.host.messageBox("What is up with the inconsistent message.", " ", 1);

      }

       

      It is so funny that it is the first part of this script that works, the part with the else if does not work. Please I need help with this.

       

      Thanks

       

      Tammy


        • 1. Re: Why is my code not working?
          jnicholas330 Level 3

          It looks like you are missing the double equals. See below.

           

          if((CB3.fillColor ="125,125,125") &&(CB5.rawValue=="1")){

           

              CB6.rawValue=0;

           

             xfa.host.messageBox("This report is inconsistent, the Rater and

             Senior Rater have stated different opinions on the promotion potential of this

             Soldier. The Reviewer should discuss the assessment differences between the

             Rater and Senior Rater. If both rating officials elect to leave the report as

             written, the reviewer will “non-concur” this report based on the inconsistent

             assessments.", " ", 1);

           

            }

           

            else if((CB4.fillColor == "128,255,0") && (CB5.rawValue=="1")){

           

            CB6.rawValue=0;

           

          xfa.host.messageBox("What is up with the inconsistent message.", " ", 1);

           

          }