Copy link to clipboard
Copied
Hello everyone, I need to change the color of a box according to the value of another box, can someone help me please?
Copy link to clipboard
Copied
or else, change the color according to the value of the box
if it is >= 1/1000 red
<= 1000 black
Copy link to clipboard
Copied
The description of your conditions is not clear. Do you want it to appear as red about 1000, and as black below it (inc.)?
Copy link to clipboard
Copied
thank you
if the value is > or = 1/1000 then the color is red
if the value is < 1000 then the color is black
Copy link to clipboard
Copied
Those two conditions are overlapping. 20 is both bigger than (or equal to) 1/1000 and smaller than 1000, for example. Try explaining it in words, please, as I think you're confusing the mathematical operators.
Copy link to clipboard
Copied
sorry
if the risque is > or = 1/1000 then color of text is red
if the risque is < 1/1000 then the color is black
i forgot to put 1/
Copy link to clipboard
Copied
Copy link to clipboard
Copied
risk > 1/1000 = risk greater than 1 in 1000
Copy link to clipboard
Copied
1/1000 = 0,001
Copy link to clipboard
Copied
OK, then you can use this code as the field's custom Validation script:
event.target.textColor = (event.value<0.001) ? color.black : color.red;