Does anyone know if a field can populate a result of PASS/FAIL/COMPLIANT based on a GREATER THAN or LESS THAN number?

Jan 08, 2018

Copy link to clipboard

Copied

Does anyone know if  a field can populate a result of PASS/FAIL/COMPLIANT based on a GREATER THAN or LESS THAN number? Ex: below 10 - field should show text True or false

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

Yes, if the field containing the number is different than the field showing the text, then you'll need a calculation script in the field that is showing the text

Here's an example

event.value = (this.getField("A").value < 10)?"True":"False";

TOPICS
Acrobat SDK and JavaScript

Views

69

Likes

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

Does anyone know if a field can populate a result of PASS/FAIL/COMPLIANT based on a GREATER THAN or LESS THAN number?

Jan 08, 2018

Copy link to clipboard

Copied

Does anyone know if  a field can populate a result of PASS/FAIL/COMPLIANT based on a GREATER THAN or LESS THAN number? Ex: below 10 - field should show text True or false

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

Yes, if the field containing the number is different than the field showing the text, then you'll need a calculation script in the field that is showing the text

Here's an example

event.value = (this.getField("A").value < 10)?"True":"False";

TOPICS
Acrobat SDK and JavaScript

Views

70

Likes

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
Jan 08, 2018 0
Adobe Community Professional ,
Jan 08, 2018

Copy link to clipboard

Copied

Yes, if the field containing the number is different than the field showing the text, then you'll need a calculation script in the field that is showing the text

Here's an example

event.value = (this.getField("A").value < 10)?"True":"False";

Likes

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
Reply
Loading...
Jan 08, 2018 0
Jan 13, 2020

Copy link to clipboard

Copied

I'm doing something similar to OP, but I need to return a value of "True" or "False" if the field containing the number is less than or equal to a value in another field. How do I make this syntactically correct, where Y is the second field?

event.value = (this.getField("X").value <= Y)?"True":"False";

Likes

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
Reply
Loading...
Jan 13, 2020 0
try67 LATEST
Most Valuable Participant ,
Jan 13, 2020

Copy link to clipboard

Copied

event.value = (this.getField("X").value <= this.getField("Y").value)?"True":"False";

Likes

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
Reply
Loading...
Jan 13, 2020 0