Skip to main content
Participant
October 10, 2017
Question

Is there a way to create a global list, in Adobe, so many combo boxes can access it?

  • October 10, 2017
  • 2 replies
  • 696 views

I have created a document javascript:


var instructors = new Array(" ","10 Ferrell","18 Mills","19 Banner","35 L. Robinson","47 G. Robinson","48 Williams","62 Mask","65 Buchanan","88 Brackett"); // define array of items for combo boxes

var oComboBox = this.getField(event.value); // get combo box
oComboBox.setItems(instructors); // set items from array

but somehow the information doesn't get entered into the combo boxes.  I'm trying to use the event.value code so I don't have to include all the field values.  I have referenced the javascript in the Format > Custom Keystroke Script.  There are 400 combo boxes referring to this one array.  It would be really nice to only have to change this array 1 time when an instructor leaves instead of 400 times.  Plus the form takes a long time to open up with all the fields.  What am I doing wrong??

This topic has been closed for replies.

2 replies

Bernd Alheit
Community Expert
Community Expert
October 10, 2017

Why doesn't you use an action in the Action Wizard?

Participant
October 10, 2017

Not to sound stupid or anything but what Action would I use?

Bernd Alheit
Community Expert
Community Expert
October 10, 2017

You can use your code in the action.

try67
Community Expert
Community Expert
October 10, 2017

event.value doesn't make sense in this context. You need to specify the actual field name.