• change the color of Field according to the value o...

# change the color of Field according to the value of another

Community Beginner ,
Jul 09, 2022 Jul 09, 2022

Copied

Hello everyone, I need to change the color of a box according to the value of another box, can someone help me please?

TOPICS
Create PDFs , PDF forms

Views

68

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
9 Replies 9
Community Beginner ,
Jul 09, 2022 Jul 09, 2022

Copied

or else, change the color according to the value of the box
if it is >= 1/1000 red
<= 1000 black

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 10, 2022 Jul 10, 2022

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.)?

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Jul 10, 2022 Jul 10, 2022

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

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 10, 2022 Jul 10, 2022

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.

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Jul 10, 2022 Jul 10, 2022

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/

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Jul 10, 2022 Jul 10, 2022

Copied

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Jul 10, 2022 Jul 10, 2022

Copied

risk > 1/1000 = risk greater than 1 in 1000

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Jul 10, 2022 Jul 10, 2022

Copied

1/1000 = 0,001

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 10, 2022 Jul 10, 2022

Copied

LATEST

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;

Likes

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Resources