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

Re: "IF" calculations in Adobe Pro forms

$
0
0

A custom calculation script that you can use for the total field could be like:

 

// Custom calculation script for TOTALMEETINGS field

(function () {

 

    // Initialize variables

     var i, count = 0;

 

    // Loop through the dropdowns, increment counter if item is selected

    for (i = 0; i < 10; i += 1) {

        count += getField("COMMITTEE" + i).value === " " ? 0 : 1;

     }

 

    // Set this field value to the count

    event.value = count;

 

})();

 

 

This assumes the entry that looks blank is really a single space.


Viewing all articles
Browse latest Browse all 57214

Trending Articles



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