Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Why is my code not working?

Avatar

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
lpianwi
Level 2

Like

1 like

Total Posts

69 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
lpianwi
Level 2

23-09-2014

@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


Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Validate 10
Level 4
jnicholas330
Level 4

Likes

21 likes

Total Posts

325 posts

Correct Reply

31 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 4
jnicholas330
Level 4

Likes

21 likes

Total Posts

325 posts

Correct Reply

31 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
jnicholas330
Level 4

23-09-2014

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);

}