# Get the display value of a text entry field?

**URL:** https://forum.servoy.com/t/get-the-display-value-of-a-text-entry-field/18656
**Category:** Classic Servoy
**Created:** [December 8, 2015, 11:02pm UTC](https://forum.servoy.com/t/get-the-display-value-of-a-text-entry-field/18656 "2015-12-08T23:02:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![joe26](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@joe26](https://forum.servoy.com/u/joe26)
#### Post date: [December 8, 2015, 11:02pm UTC](https://forum.servoy.com/t/get-the-display-value-of-a-text-entry-field/18656/1 "2015-12-08T23:02:08Z")

</div>

Hello,

I’m attempting to get the display variable of a text field, that is populated in a type\_ahead by a valuelist.  
Using the Servoy Security Framework with multiple windows doesn’t work, since the UUIDs are all new, so must use the element\_name.

I’ve hit this before and wrote a work-around, but have that need again. Worked around, but trying to understand where I couldn’t go before.

I can get the dataprovider, element name, form name, mixed with other functions, and it always circles around to the data value, not the display value.

Cannot see the forest from the trees…

The text field is of type TYPE\_AHEAD.  
The dataprovider is tied directly to the record.element\_uuid.  
The valuelist is [‘name’,‘uuid’].

var elementNames = security.getElementUUIDs(form\_name);  
for (var index = 0; index \<= elementNames.getMaxRowIndex();index++){  
elementNames.rowIndex = index;  
if (elementNames.uuid == element\_uuid){  
element\_name = elementNames.name;  
break;  
}  
}

What do I need to call to get the display value of the text field?

thanks,  
–Joe.

---

<div class="post-metadata">

### Author: ![Joas](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/joas/32/5095_2.png) [@Joas](https://forum.servoy.com/u/Joas)
#### Post date: [December 9, 2015, 1:39pm UTC](https://forum.servoy.com/t/get-the-display-value-of-a-text-entry-field/18656/2 "2015-12-09T13:39:58Z")

</div>

There is a function for this under the application node:

```auto
var displayValue = application.getValueListDisplayValue(valuelistName, realValue)

```

---

<div class="post-metadata">

### Author: ![joe26](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@joe26](https://forum.servoy.com/u/joe26)
#### Post date: [December 9, 2015, 4:16pm UTC](https://forum.servoy.com/t/get-the-display-value-of-a-text-entry-field/18656/3 "2015-12-09T16:16:52Z")

</div>

I didn’t see that this time around, but it doesn’t give me the display value for global method-based valuelist. Something that didn’t make it in the edit on my post.

“Retrieve a valuelist display-value for a real-value. NOTE: this doesn’t return a value for a valuelist that depends on a database relation or is a global method valuelist.”

I’ll just cache the results from the method.

Thanks, Joas!
