These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Automatically select Check Box

phornung2
Registered: Mar 2 2010
Posts: 23

I'm hoping someone might be able to offer a suggestion. I'm trying to create a script that would automatically insert a check into a check box if the sum total of another field in the form is greater than a specific number. In other words, if someone enters a number greater than 10 in field sum.total, then a check would automatically be inserted into a Yes checkbox. If less than 10, a check would automatically be inserted into a No checkbox.

Thanks in advance for any suggestions/thoughts.

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

this can be done with a small FormCalc script.

;this line is only a sample to calculate a sum$ = Field1 * Field5 ;de-/activate checkboxes depending on sumif($ > 99) thenCheckBoxYes.rawValue = 1CheckBoxNo.rawValue = 0elseCheckBoxYes.rawValue = 0CheckBoxNo.rawValue = 1endif

 ;don't forget this line, otherwise the sum field only;shows 1 (true) or 0 (false) as result of the if expression above$ = $

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

phornung2
Registered: Mar 2 2010
Posts: 23
Hi Radzmar,

Thank so much. Works perfectly. Thanks again.