Drop down list. Automatic deselection as user chooses data?

Avatar

Avatar

tomc81079816

Avatar

tomc81079816

tomc81079816

09-06-2016

Hi there

I really didn't know how to title this! I have a grouped list of items all with the same drop down list values- simply numerical 1 to 12-

954885_pastedImage_0.png

What I would like to be able to do is only allow each number to be selected once. So if the user selects '1' on the first item, '1' is no longer available for selection from the subsequent drop downs. And on and on until all 12 numbers have been selected.

Any know how best to achieve this?

Many thanks

Tom Carter

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

mattiaswallin

Avatar

mattiaswallin

mattiaswallin

09-06-2016

I am not entirely sure on how much you know about the scripting in LiveCycle Designer? I am quite new myself, but did a quick test just to get you started.

This thread contains (pretty much) all information you need:  Add/Remove the same exact item in a dropdown .

Just set up a trial document where you use two dropdowns and experiment there. But on the actual implementation I would set up some kind of script which on exiting each dropdown list uses the chosen value of that current dropdown and removes the found value from all the other dropdowns. I think there was a good example in that other post on how to identify actual values indexes. It will still be a quite tricky thing to actually remove stuff from each dropdown, as you need some way to add them back if they "change their minds" and change an earlier dropdown etc.

Therefore a more easier way (but a bit "uglier") would be to simply leave all choices in all the dropdowns, but whenever you exit any dropdown just compare the chosen value in it to all the other dropdowns, and if there is a "hit" prompt an error message explaining that it isnt feasible and reset the current dropdown. (Pretty much only preventing the user to choose a value again when it is already present in another dropdown).

I hope this was at least somewhat helpful.

regards, Mattias