5 Replies Latest reply on Mar 26, 2015 8:59 AM by hasand59089870

    javascript ValidateMinMax & Functions(colorfield)

    martins82060393 Level 1

      Hi,

       

      I wish to add two more value validates to my script.

       

      currently:

       

       

      function ColorField(AFieldName,AOK)

      {

         var f=this.getField(AFieldName);

       

       

         if (AOK || f.value == 'N/A')

            f.textColor=color.black;

         else

            f.textColor=color.red;

         return AOK;

      }

       

       

      Field with validate:
      ColorField('O2Reading',ValidateWithSetPoint('O2SetPoint','O2Reading',0.2));

       

       


      would like - Min > Max:

      0 > 0.2 > Black
      0.21 > 07 > orange
      0.7 ~ red

       

      Hope there is a kind soul, who can help