Select Component

I have a textInput, with a value from API. What I want is when button is clicked select dropdown should open, with the value default written the one textInput contains(since textInput is now hidden), But I am not bale to display that value in select component.

How can I do this..PLease help

Why don't you just populate the select component with the value from the query?

You would have to create an Event Handler for that button using onClick and write something like this for the value:

1 Like

@ScottR This isn't working in my case. Can you once try at your end

Can you post a screenshot of what you are doing?

I want this engineering manager to be like this in 4th image of dropdown

Instead of Run Script use Change event and select the Control Component Action

This is event handler on button, and it is not working

I do not believe that you can set the value of a select field from a button with a single value. I posted the selection of a value in a drop down to be set in a text field…is that not what you need to do?

NO, i want opposite textbox value to select field.

Hi @ishi8, Is the value you're setting on your select component included in the array of id values from the list_job_role data source? If not, then you'd need to 'Allow custom values' on your select component in order to set that value with select.setValue().

I hope that helps!