Calculations in forms

New Here ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

I have set up the Total budget field to divide by the project rebate amount and then output to the bottom left one then the same but for the other budget field output to the CN budget field. I keep getting this error though when anything is typed into the form. I am making this form for others to fill this out so I need the fields to be blank for them to type. 

TOPICS
PDF forms

Views

28

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 ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

You're getting this error because nothing is typed in the form. This means the divisor is being interpreted as zero, which is not allowed, so the result is NaN (Not a Number) and can't be assigned to a field with the Number format.

To overcome this you have to use a script that checks the second field's value, and if it's not empty (or zero) proceeds with the calculation.

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 ,
Jul 15, 2022 Jul 15, 2022

Copy link to clipboard

Copied

LATEST

Correction: Technically, the result is not NaN, but Infinity.

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