• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
15

Change field value based on border color

Community Beginner ,
Dec 22, 2023 Dec 22, 2023

Copy link to clipboard

Copied

Hello,

 

I am working on a document for my company. There are some options that I want to directly correlate to another sheet. See attached screenshots.

 

The ideal scenario is:

If the user select "Cleaning System" on sheet 1, the border color will change to red. Once the border changes to red, the field value on sheet 3 will read "Yes". If the user deselects "Cleaning System" on sheet 1, the field value on the sheet 3 will read "N/A". I've done this before with check boxes, but not sure what the export values are for buttons. Any help is appreciated. Thank you!

TOPICS
How to , JavaScript , PDF , PDF forms

Views

263

Translate

Translate

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 guidelines

correct answers 1 Correct answer

Community Expert , Dec 22, 2023 Dec 22, 2023

Use this:

this.getField("Cleaning System Eng").value = (color.equal(color.red, event.target.strokeColor)) ? "Yes" : "N/A";

Votes

Translate

Translate
Community Expert ,
Dec 22, 2023 Dec 22, 2023

Copy link to clipboard

Copied

Use this:

this.getField("Cleaning System Eng").value = (color.equal(color.red, event.target.strokeColor)) ? "Yes" : "N/A";

Votes

Translate

Translate

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 guidelines
Community Expert ,
Dec 22, 2023 Dec 22, 2023

Copy link to clipboard

Copied

Just be aware the at the equal method is very finicky. It works well with the base colors, but as soon as you introduce fractions as the values of the color elements, it's likely to stop working correctly.

Votes

Translate

Translate

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 guidelines
Community Beginner ,
Dec 27, 2023 Dec 27, 2023

Copy link to clipboard

Copied

LATEST

This worked like a charm. Thank you so much!

 

@try67 Base colors should work fine for what I'm doing here. Thanks for the heads up!

 

Votes

Translate

Translate

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 guidelines