Expand my Community achievements bar.

Drop downs in LiveCycle Designer


Level 1

I have two drop downs.  The first drop down has 5 items, the second has 20.  When the user selects a item in the first drop down I only want the second drop down to show 4 of the items.  How do I write a script for that?  Thank you!

1 Reply


Former Community Member

I would like to know if it is an item in the first dropdown list corresponding to 4 items of the second.

If yes,you can use array.

1. In the first "exit" event

var alistName = new Array("A","B","C","D");

var alistValue = new Array("1","2","3","4");

var blistName = new Array("AA","BB","CC","DD");

var blistValue = new Array("11","22","33","44");

if(this.rawValue == "A")


for(var i=0;i<alistName.length;i++)


var name = alistName[i];

var value = alistValue[i];



if(this.rawValue == "B")


for(var j=0;j<blistName.length;j++)


var bname = blistName[j];

var bvalue = blistValue[j];


2. In the first "change" event

if(xfa.event.newText !=this.rawValue){ DropDownList2.rawValue = null; }