A two part question.
Part One:
I've entered the following function in each of seven total fields that sum up the values of seven fields specific to each of them.
TotalSeven("AB1_Mod","AB1_Arm","AB1_Class","AB1_PROF","AB1_FEAT","AB1_ENH","AB1_Misc1")
The function's formula is as follows:
function TotalSeven(M1,M2,M3,M4,M5,M6,M7) { var Mod1 = Number(this.getField(M1).value); var Mod2 = Number(this.getField(M2).value); var Mod3 = Number(this.getField(M3).value); var Mod4 = Number(this.getField(M4).value); var Mod5 = Number(this.getField(M5).value); var Mod6 = Number(this.getField(M6).value); var Mod7 = Number(this.getField(M7).value); var Score = Mod1+Mod2+Mod3+Mod4+Mod5+Mod16+Mod7; event.value = Score; }
I thought I was clever and took an idea and replicated it's principle, but none of my Total fields are totaling. What did I do wrong?
Part Two:
I have other Total fields that have fewer then seven values to total and some total groups have a set of values that fluctuate from 3 to 4. is there a way that, once I get the above function formula to work, that it can work on all my total fields regardless the number of field values available to total?
Example:
TotalSeven("AB1_Mod","AB1_Arm","AB1_Class","AB1_PROF","AB1_FEAT","AB1_ENH","AB1_Misc1")
OR
TotalSeven("AB1_Mod","AB1_Arm","AB1_Class","AB1_PROF")
Thanks in advance,
Jim.
TotalSeven("AB1_Mod","AB1_Arm","AB1_Class","AB1_PROF","AB1_FEAT","AB1_ENH","AB1_Misc1")
What field event did you place this code in?
George