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

Calculating fields with if/else

Community Beginner ,
Nov 01, 2016 Nov 01, 2016

Help!  I am such a newbie and I have tried to utilize the other posts which were similar.

Here is the simple script.

var C5 = this.getField("C5").value

if(C5=0) {

event.value=0;

}else {

event.value=(1000/C5);

}

When I change the value in C5, nothing changes in the calculated field it just keep displaying 'Infinity'.

I am using acrobat for the form creation.

TOPICS
Acrobat SDK and JavaScript , Windows
434
Translate
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 , Nov 01, 2016 Nov 01, 2016

Change:

if(C5=0) {

To:

if(C5==0) {

Translate
Community Expert ,
Nov 01, 2016 Nov 01, 2016

Change:

if(C5=0) {

To:

if(C5==0) {

Translate
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 ,
Nov 01, 2016 Nov 01, 2016
LATEST

OMG !!!

THANK YOU !!!

It works perfectly now!!

Translate
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