Get ComboBox Id and Value

Get ComboBox Id and Value

  

Good day,

I have a combo box and I want to get the Id and the text value that the user selected and assign it in a variable, Is there a way I can do that? Or only the Id can be retrieved and use another query to get the text that I need?

Solution

The easy way is getting the ID on a Screen Action and querying the database to get the description text of the selected option.

You can also use some javascript in order to "copy" the description to a hidden field when the user changes the combobox, like this: https://jsfiddle.net/joaomelont/vtoxtwg7/

But... I need to ask... Why would you need the description of a combobox item?

Solution

João Melo wrote:

The easy way is getting the ID on a Screen Action and querying the database to get the description text of the selected option.

You can also use some javascript in order to "copy" the description to a hidden field when the user changes the combobox, like this: https://jsfiddle.net/joaomelont/vtoxtwg7/

But... I need to ask... Why would you need the description of a combobox item?

Thank you for the reply sir J.

I will do that. 

I just need to display the description of the selected combobox item somewhere in the page.