Expand my Community achievements bar.

SOLVED

Changing Values of Drop Down Box??

Avatar

Level 1

I have created a form that has 100 drop down boxes, each drop down box has the same values for the user to choose. I would like to know if it is possible to remove the selected value from the remaining drop downs once it has been selected?

Example:

Drop Down Box 1: user selects "A" when the user moves to Drop Down Box 2 "A" is not available for selection but the remaining values are. User Selects "B", moves to Drop Down 3 and both "A and B" are not available for selection.

I hope this makes sense and can't figure out how to make this happen, I am a fairly new user to LC and would appreciate any help. Thank you for your time!!

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi.

Like Niall says, it's probably possible, but like him, I would argue the wisdom of attempting this. Not only could it be very sluggish, but you also could get yourself into a nasty situation.

For example, what if the user selected A in the first dropdown, B in the second, and C in the third - and then went back to the first dropdown and selected C?

I don't know what you're trying to achieve, but perhaps one way to do this would be to have some validation logic at the end that ensures that they only have selected each value one, and leave it up to them to pass the validation.

My 2c.

Howard

View solution in original post

2 Replies

Avatar

Level 10

Hi,

While technically you can do this, I think that it would be a poor performance because the script would need to loop through the 100 dropdowns.

You would need to place script in the preOpen event of the dropdowns, that loops through and looks at previous selections.

I worked this up over the weekend, but it is not 100%. http://assure.ly/KXAUg5.

The script in the preOpen event calls a function in the AssureDynamics script object (see the Hierarchy).

Hopefully someone can pick up the running on this, as I wont be able to for the week.

Good luck,

Niall

Avatar

Correct answer by
Level 9

Hi.

Like Niall says, it's probably possible, but like him, I would argue the wisdom of attempting this. Not only could it be very sluggish, but you also could get yourself into a nasty situation.

For example, what if the user selected A in the first dropdown, B in the second, and C in the third - and then went back to the first dropdown and selected C?

I don't know what you're trying to achieve, but perhaps one way to do this would be to have some validation logic at the end that ensures that they only have selected each value one, and leave it up to them to pass the validation.

My 2c.

Howard