Skip to main content
davidm76220796
Known Participant
November 22, 2016
Answered

Field Background won't change back

  • November 22, 2016
  • 1 reply
  • 450 views

I made a script to change the background to RED is the value was less than 4 AND greater than 0.

The changing to RED works great.  Problem is when it changes to anything above 4 it stays RED and wont' go back to Orange.

var G5= this.getField("G5").value;

var C7= this.getField("C7").value;

var C8= this.getField("C8").value;

if((C8*G5)==0)

{

event.value=(C7);

}else{

event.value=(((G5/C8)/5280)*3600);

}

(function (){

if (event.value<4 && event.value>0)event.target.fillColor=color.red;

else

event.target.fillColor=color.orange;

})();

This topic has been closed for replies.
Correct answer try67

There's no such thing as "color.orange". You need to use a RGB or CMYK

color array.

On Tue, Nov 22, 2016 at 10:13 PM, davidm76220796 <forums_noreply@adobe.com>

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
November 22, 2016

There's no such thing as "color.orange". You need to use a RGB or CMYK

color array.

On Tue, Nov 22, 2016 at 10:13 PM, davidm76220796 <forums_noreply@adobe.com>

davidm76220796
Known Participant
November 22, 2016

Well, THAT would explain a few things 

Thanks, for the help.