Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Designer
Viewing all articles
Browse latest Browse all 16286

if statement in Java Script

$
0
0

Hi,

 

I just want to create a simple IF statement. I have looked at two text books and the on-line help but it still does not work.

 

I have two fields.

 

One is called "IfTest"

 

The other is called "PFValue"

 

If "A" is entered in field "IfTest" then I want the text message "50:50" to appear in the "PFValue" field. If "A" is not entered the I want "50:25:25" to appear.

 

The formula I have entered in field "PFValue" is :

 

ProFormaInv.Invoice.PFValueB::calculate - (JavaScript, client)

 

if (IfTest.rawValue == "A")

 

"50:50"

Else

 

"50:25:25"

But it does not work. What have I done wrong? I have attached the pdf form I am creating which is a Pro Forma Invoice.

 

Regards

 

Chris C


Viewing all articles
Browse latest Browse all 16286

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>