Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
April 25, 2017

As the field's custom validation script enter this code:

if (event.value>=1.77150 && event.value<=1.77221) event.target.textColor = color.red;

else event.target.textColor = color.black;

5 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
April 25, 2017

As the field's custom validation script enter this code:

if (event.value>=1.77150 && event.value<=1.77221) event.target.textColor = color.red;

else event.target.textColor = color.black;

Translate
dmdowsettAuthor
Participant
April 25, 2017

OK, for some reason that didn't work, but I changed the color coding around so first line black and second line red and that was it, thank you.

Translate
try67
Community Expert
Community Expert
April 25, 2017

Sorry, I didn't notice you want it to be red if it's outside that range. Yes, changing the colors should solve that.

Translate
Inspiring
April 25, 2017

You have to use the custom JavaScript option on the Validation tab for the field's properties. Since you are focused on that field when validating, use the "event.value".

Translate
dmdowsettAuthor
Participant
April 25, 2017

Right but it only seems to work on whole numbers.

Translate