Skip to main content
traceyh53384130
Participant
May 29, 2019
Question

How to calculate the average of fields with values.

  • May 29, 2019
  • 1 reply
  • 2185 views

How would I write the formula in adobe?

Message was edited by: Malcolm Thomson

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
May 29, 2019

So basically you want to ignore empty fields, right? I posted code that does that on these forums. Search for "calcAverage" and you should be able to find it.

traceyh53384130
Participant
May 30, 2019

I'm brand new to Adobe, so unsure of where to put the script and make it work.  I went into custom script and edit and pasted the script you had written.  also brand new at calculations, so sorry if I sound stupid.

when you say fields in your script, does that mean I put my fields everywhere it says fields?  below are the fields I am looking at

try67
Community Expert
Community Expert
May 30, 2019

Yes, this code should be used as the custom calculation script of the field where you want to show the result.

You need to enter the names of the fields, between quotes, into the fields array, yes.
Give it a try and post here how it goes... If it's not working correctly press Ctrl+J and check if there are any error messages in the window that opens.