cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownByIndex question

Former Member
0 Kudos

Lets assume we have a dropdownbyindex with the following values.

'A'

'B'

'C'

Is there a graceful way to set a selected index based on a table value? To explain, let's say this drop down is one input in a form full of inputs and the back end is supplying data for an update. When the form loads, all the inputs are populated based on the data passed in. In the case of a drop down, 'B' is passed in and I'd like the drop down index to be 2 (in this case).

In other words, based on the data I'd like the drop down to reflect the appropriate selected value.

Other than looping and comparing values and then setting lead selection index, I don't see a pre-existing solution.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Yes - use a DropDownByKey - it works exactly as you describe.

Former Member
0 Kudos

method set_selected_key

There is is, I feel foolish. Thanks Thomas. For some reason I missed this

Answers (0)