# How do I get the display value of combobox?

**URL:** https://forum.servoy.com/t/how-do-i-get-the-display-value-of-combobox/3840
**Category:** Classic Servoy
**Created:** [March 10, 2005, 6:34pm UTC](https://forum.servoy.com/t/how-do-i-get-the-display-value-of-combobox/3840 "2005-03-10T18:34:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)
#### Post date: [March 10, 2005, 6:34pm UTC](https://forum.servoy.com/t/how-do-i-get-the-display-value-of-combobox/3840/1 "2005-03-10T18:34:37Z")

</div>

Is there a simple way of getting the display\_value of a combobox when I know the real\_value?

---

<div class="post-metadata">

### Author: ![Riccardino](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Riccardino](https://forum.servoy.com/u/Riccardino)
#### Post date: [March 10, 2005, 7:32pm UTC](https://forum.servoy.com/t/how-do-i-get-the-display-value-of-combobox/3840/2 "2005-03-10T19:32:27Z")

</div>

> swingman:  
> Is there a simple way of getting the display\_value of a combobox when I know the real\_value?

Using a formbyquery, for instance. But I’m not so sure it can be considered a “simple” way 😉

---

<div class="post-metadata">

### Author: ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)
#### Post date: [March 11, 2005, 9:41am UTC](https://forum.servoy.com/t/how-do-i-get-the-display-value-of-combobox/3840/3 "2005-03-11T09:41:29Z")

</div>

Ciao Ric,

Ferrara, a nice city…

Formbyquery would be kind of a workaround! However, I managed to solve the problem by setting the dataprovider for the combobox to integer.

Thanks

---

<div class="post-metadata">

### Author: ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)
#### Post date: [March 11, 2005, 10:03am UTC](https://forum.servoy.com/t/how-do-i-get-the-display-value-of-combobox/3840/4 "2005-03-11T10:03:52Z")

</div>

You can retrieve the contents of the value lists via a method. If you know the value that is stored in the field, you can figure out the display value from that, couldn’t you?

---

<div class="post-metadata">

### Author: ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)
#### Post date: [March 11, 2005, 3:19pm UTC](https://forum.servoy.com/t/how-do-i-get-the-display-value-of-combobox/3840/5 "2005-03-11T15:19:56Z")

</div>

Hi Patrick,

I was hoping for something like:

var dataset = Application.getValueListItems(‘somevaluelistname’);  
var thedisplay\_value = dataset[real\_value];

Anyway, I have rewritten my code to eliminated this issue 😉
