hi,
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...
tnx
Kobi
Views
Replies
Total Likes
Your calculate script in formcalc could be:
if (fieldC == 1) then
$ = fieldA*fieldB*4
elseif (fieldC == 2) then
$ = fieldA*fieldB*8
endif
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.
Views
Replies
Total Likes
it worked, many thanks!!!
is there any "formcalc for dummies" i can look at?
Views
Replies
Total Likes
The logic of formcalc is similar to visual basic. The help files that come with LiveCycle are very good for syntax.
Views
Replies
Total Likes
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.
http://help.adobe.com/en_US/livecycle/9.0/FormCalc.pdf
http://help.adobe.com/en_US/livecycle/9.0/LiveCycle_Designer_Scripting_Basics.pdf
http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
http://help.adobe.com/en_US/livecycle/9.0/lcdesigner_scripting_reference.pdf
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies