Hi all,
Very likely a newbie question, but here goes. I have a field whose value is the sum of two other fields:
Field 1: txtAcademicsIP
Field 2: txtAcademicsMisc
These should sum to:
Field 3: txtAcademicsAR
I set up a function for Field 3, which is called like this: 'tnValue (Academics)'
function tnValue (abl) {
return (txt + abl + IP.Value) + (txt + abl + Misc.Value);
}
Problem is that I'm getting script errors every time it's run, and I'm starting to think it's the concatenation in the function. I've tried quotes, literal values, and constants, but the errors persist.
Anyone have a similar problem? The alternative is manually typing the source as "txtAcademicsIP.Value + txtAcademicsMisc.Value" for each of 20 fields, which I'd like to avoid.
Comments
What you want to do is instead pass the field itself as a parameter:
Then set up the field source as
My only excuse is that PHP has spoiled me - just needed a second pair of eyes. :?
I see how your code is working - thanks for the nudge.
Cheers,