4 Replies Latest reply on Oct 25, 2015 3:08 PM by evageorgez

    Changing fill color based on range of values


      Creating a form for inspecting parts. Working on configuring a text field to change fill color based on the number or data entered. For example: if range is between 0-20 fill color is red, between 20-24 fill color is green, greater than 24 fill is again red, and if no data is entered the fill color is white. The script below is working for me though keeps the field red when data is removed from field (blank). Not sure if im approaching this correctly of if I should be looking at it a different way? I have different ranges for many fields and im trying to keep the script at straight forward as possible. Thanks in advance for any assistance.


      if (event.value > "24") 

      event.target.fillColor = color.red;

      else if (event.value < "20") 

      event.target.fillColor = color.red; 

      else event.target.fillColor = color.green;