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

more on auto content based on choice of previous Combo Box - LiveCycle

Genie001
Registered: May 19 2010
Posts: 10
Answered

In order to have a more dynamic form, I have taken the project to LiveCycle. And of course, the JS needs to be changed.

I have tried this where ClassCode1 is the combo box and DescriptionRow1 is the desired field I want to auto fill:

in the combo box, with Show : mouseExit and the Object Field type is combo box
AND in the text field with Show : mouseExit and the Object Field type is text field - both

if (this.rawValue = '0042'
DescriptionRow1.value = 'Landscape';
else (this.rawValue = '3724'
DescriptionRow1.value = 'Millwright'; //with no result, and

if (this.rawValue == '0042'
DescriptionRow1.value == 'Landscape';
else (this.rawValue == '3724'
DescriptionRow1.value == 'Millwright'; //with no result, and

if (ClassCode1.rawValue == '0042'
DescriptionRow1.value == 'Landscape';
else (ClassCode1.rawValue == '3724'
DescriptionRow1.value == 'Millwright'; //with no result

Thanks for your help.

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You need to close your logical statement for the 'if' statement with a closing ')'.

There is also an 'els if' statement. Again you need to close your logical statement with a closing ')'.

The equality comparison operator is '=='.

The set value operator is '='.

What error messages are you getting?

George Kaiser

Genie001
Registered: May 19 2010
Posts: 10
Thanks, I have adjusted the script to this and it works.

if (ClassCode1.rawValue == '0042')
DescriptionRow1.rawValue = 'Landscape';
else if(ClassCode1.rawValue == '3724')
DescriptionRow1.rawValue = 'Millwright';

I also changed the event to a calculate and it goes much faster that using mouse.exit