Updated way to do drop downs returning id of selected value

Create your table

Create your function

Load the data into an array. And then map it to a text list (so the drop down can use it)

Create a single select, and create its ‘selected value’

Populate the drop down from the drop_down_list

Now write a trigger to populate the selected index

4 Likes

@mellerbeck I love this. Combining the MAP_TO_[TYPE]_LIST() with ARRAY_INDEX_OF() is such a powerful technique, and you’ve given a really clear, elegant example of how it works here. Thanks for sharing!

1 Like