Answered
I have a form with a table containing a combo box (ClassCode1) and a text field (DescriptionRow1) I want to auto populate. The combo box’s properties/options have the numerical values entered. The text field properties/calculate radio is set to custom calculation script and contains the script:
// using the 'combo box1' field value:
switch(this.getField('ClassCode1').value) {
case '42' :
event.value = Landscape; // 'EB' choice
break;
case '3724' :
event.value = Millwright; // 'TT' choice
break;
case '5020' : // 'EB-SS' choice
event.value = Acoustical_Ceiling;
break;
}
When I save the form and go to preview, I can select the combo box property, but nothing shows up in the text field. Am I missing a step somewhere?
Are the items you are trying to set the text field to variable names, field names, or text strings?
Quotation marks are used to identify text strings and not numbers. Text strings need to enclosed in quotation marks.
I would set the optional export value in the combo box and then I would only need to get the value of the combo box. You could also initialize the combo box with an document level script so updating the combo box's option and export value is done by editing an array variable.
George Kaiser