Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Drop down box dependent on previous drop down box?

LucaAnd
Level 1
Level 1

I've a tricky problem that I'm unable to find a solution to online.

I've built an expanding table (using action builder) and within the first two columns of row1 I've set drop down boxes.

Data Set selectionSelect item from Data Set
Drop down box 1Drop down box 2+ / - (add remove rows)

The first drop down box correlates with a data set; 1, 2, 3. When that data set is selected I would like the next cells drop box to show the listed information corresponding to that data set.

I'm fairly new to Livecycle but I've got a fairly good handle on how it operates.
I'd thought I could create a sub-form within that 2nd cell and then build in it 3 drop boxes, set them to 'hidden (exclude from layout)' and create an action rule to 'enable' the correct one when the corresponding data set was selected from the 1st cell -- unfortunately this doesn't work.


I'm hoping someone here can assist me in this tricky problem or I'll have to think up some other way to set this information in my form.

Thank you in advance,
Luca

1 Accepted Solution
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi Luca,

I am not sure why your approach didn't work, sounds like it should.

However, another approach would be to update the values in the drop down list in the second column.  You can do this with code in the change event of the first drop down list, so something like;

DropDownList2.rawValue = "";

switch (xfa.event.change) {

case "1": DropDownList2.setItems("A,B,C");

     break;

case "2": DropDownList2.setItems("D,E,F");

     break;

case "3": DropDownList2.setItems("H,I,J");

     break;

}

This assumes you called the second drop down DropDownList2.

Regards

Bruce

View solution in original post

1 Reply
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi Luca,

I am not sure why your approach didn't work, sounds like it should.

However, another approach would be to update the values in the drop down list in the second column.  You can do this with code in the change event of the first drop down list, so something like;

DropDownList2.rawValue = "";

switch (xfa.event.change) {

case "1": DropDownList2.setItems("A,B,C");

     break;

case "2": DropDownList2.setItems("D,E,F");

     break;

case "3": DropDownList2.setItems("H,I,J");

     break;

}

This assumes you called the second drop down DropDownList2.

Regards

Bruce

View solution in original post