Quantcast
Channel: Adobe Community: Message List - PDF Forms
Viewing all articles
Browse latest Browse all 57214

Re: If Else Statement in Validation of Other Field's Values

$
0
0

There are two problems with your code:

1. In a Calculation script one should apply the new value using event.value, not by using the getField method.

2. You should convert the value of "Remaining Balance" to a number explictly.

 

So the code should be:

var b = Number(this.getField("Remaining Balance").value);

if (b > 3000){

    event.value = 3000;

} else event.value = b;


Viewing all articles
Browse latest Browse all 57214

Trending Articles



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