Dynamic dropdown lists


#1

I’m trying to create a group of 3 dropdowns with the same list of options to progressively filter based on selections.

Example: All 3 dropdowns offer choices “Adam, Brian, Charlie, Daniel, Ernie.” if user selects “Adam” from the first dropdown, “Adam” will show in the first text field and option “Adam” is removed from first, second and third dropdown, leaving “Brian, Charlie, Daniel, Ernie” in each dropdown list. I’ve been playing around with repeaters and variables but coming up short. Any help is appreciated. Thanks!


PLEASE HELP! Linking dropdown selections to cue another dropdown selection
#2

You’re on the right track, Ed. Repeaters are the way to do this. Here is a basic demonstration of what you describe, if I understand you correctly. Let me/us know if you’re looking for something different.

Multiple Droplists.rp (81.5 KB)

When a droplist is clicked, it shows its related repeater list. When an item in the repeater list is clicked, it assigns its text to the associated text field (below the droplists) and filters itself out of the list, and out of the other lists. This is done with the “Add Filter” action. A filter does not remove items from a repeater list, it just hides them.
Note the syntax of the filter rules: [[ TargetItem.Column0 != Item.Column0 ]]
This equates to “Show each row that does not equal the value in this row.”

To keep things simple, I also disable the droplist once a selection is made. Otherwise, we’d need to selectively remove some filters we added, which I think would get pretty tricky. For instance, if I select “Adam” from the first list, then open it again and select " Brian" I would want to show “Adam” again. …Unless “Adam” was already chosen in one of the other lists. All possible, but a bit more work to sort out the more complex logic.

I also made the droplists a little more complicated than a simple OnClick event. The droplist “button” is made of a rectangle and a triangle, grouped together and assigned to a selection group. I use selection states to show/hide the repeater lists, and all this together means it looks and behaves like a common droplist element, where the triangle (caret) indicates closed/open. If you click any droplist the others will close if open. This also allows each item in the repeater list to close the list once selected by simply setting its “parent droplist button” to an “unselected” state.


Multi-select list box in a repeater
#3

Thanks for the help! I played around with it a bit more and came up with this: Multiple Droplists.rp (102.3 KB) (see page “New Page 1”)

I decided to just use the same repeater for each dropdown and just move it depending on which button was clicked. I used 3 variables (selection1, 2 and 3) and the && boolean to control what showed in the repeater/dropdown. Thanks again for your help, it definitely got me started down the right track.


closed #4