Form fields not calculating in Adobe Reader

Community Beginner ,
Jun 24, 2022 Jun 24, 2022

Copy link to clipboard

Copied

I created a a 14-page form in Acrobat Pro DC with several fields performing calculations predicated on a user-defined date field. Everything works great when I test it in Acrobat Pro DC. However, the calculation for one field does not function when I open the file in Acrobat Reader DC. Is there some step I need to take that allows this to function?

TOPICS
Create PDFs , PDF forms

Views

39

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
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Jun 24, 2022 Jun 24, 2022
Where have you defined the function TimeDateDiff ?

Likes

Translate

Translate
Adobe Community Professional ,
Jun 24, 2022 Jun 24, 2022

Copy link to clipboard

Copied

What calculation does you use?

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
community guidelines
Community Beginner ,
Jun 24, 2022 Jun 24, 2022

Copy link to clipboard

Copied

Here's the custom calculation script I used:

 

var strStartDate = this.getField("StartDate").valueAsString; if(strStartDate != "") { var nDays = TimeDateDiff(strStartDate, "June 2, 2023", "mmm dd, yyyy", 4); event.value = nDays * 32.647; } else event.value = 0;

 

Again, it works when I test it within Acrobat Pro DC but fails to function in Acrobat Reader DC

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
community guidelines
Adobe Community Professional ,
Jun 24, 2022 Jun 24, 2022

Copy link to clipboard

Copied

Where have you defined the function TimeDateDiff ?

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
community guidelines
Community Beginner ,
Jun 24, 2022 Jun 24, 2022

Copy link to clipboard

Copied

LATEST

I figured it out. For whatever reason, it was able to calculate. I added the the definition and it now works. Thanks for your help!

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
community guidelines