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

How to do an if then statement on a PDF form

Community Beginner ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

I am trying to do an if then statement on a PDF form.

 

The field is a calculated field A=C.  If C>6 then C=5, else C=A

 

How do I write this in Adobe Pro on a PDF form?  

TOPICS
Edit and convert PDFs , PDF forms

Views

304

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 ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Your description doesn't make much sense. Do you want to calculate the value of field A, or of field C?

And what does this mean? If C>6 then C=5

Do you mean: If A>6 then C=5 ?

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 ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Hi,

Sorry about the confusion in the explanation!

I wanted to calculate the value of field C, and I wanted the value of field C to equal the value of field A and if the value of field A is greater than 6 then I wanted field C to equal 6 (rather than 5) so:

 

A=C.  If A>5 then C=5, else C=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 ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

OK, that makes more sense... You can use this code as the custom Calculation script of  C to achieve it:

 

var A = Number(this.getField("A").valueAsString);
if (A>5) event.value = 5;
else event.value = 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 Beginner ,
Aug 08, 2022 Aug 08, 2022

Copy link to clipboard

Copied

LATEST

Ok thank you!

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