Answered
Can a formula be placed in a function or global variable and then employed in a field's custom calculation? If so, I would appreciate it if someone would please provide or give a reference to a short sample. I've tried unsuccessfully.
If so, of course it can. You just need to place them in a function and then call that function from the field's Calculate event.
For example, let's say you have a document-level folder that sums up 20 fields:
function sum20Fields() {
var total = 0;
for (i=0; i<20; i++) {
total+=this.getField("Field"+i).value;
}
return total;
}
Then you can call this function from the field's Calculate event like so:
event.value = sum20Fields();
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com