i need to create a 'sum' field that will calculte fieldA*fieldB*fieldC.
fieldA and fieldB are regular numeric fields so sum (fieldA*fieldB) works just fine.
what i need is fieldC to be a radio button, so that when Option1 is checked then multiply by 4, and when Option2 is checked then multiply by 8
how do i do that?
please consider that my scripting knowledge is far less than basic, so be gentle...
Your calculate script in formcalc could be:
if (fieldC == 1) then
$ = fieldA*fieldB*4
elseif (fieldC == 2) then
$ = fieldA*fieldB*8
just make sure you have "Specify Item Values" checked for your radio buttons under Object > Binding. Also at the moment it will show '0' if none of the buttons are checked so you could put in an 'else' condition if you want it to show something else.
Here are some links to documentation on scripting.
The FormCalc, Scripting Basics and CalcScripts files have basic scripting information. The Scripting Reference is in-depth documenation.