# application.getValueListDisplayValue and Memory

**URL:** https://forum.servoy.com/t/application-getvaluelistdisplayvalue-and-memory/10490
**Category:** Classic Servoy
**Created:** [April 1, 2009, 7:23pm UTC](https://forum.servoy.com/t/application-getvaluelistdisplayvalue-and-memory/10490 "2009-04-01T19:23:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jbader](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jbader](https://forum.servoy.com/u/jbader)
#### Post date: [April 1, 2009, 7:23pm UTC](https://forum.servoy.com/t/application-getvaluelistdisplayvalue-and-memory/10490/1 "2009-04-01T19:23:04Z")

</div>

Hello,

I am confused by some behavior I am observing from application.getValueListDisplayValue()…

I have a table in my database that contains approx. 210K records. In this table, I have two columns: one which holds a unique ID and another which holds a 10-char string.

I have created a valuelist that uses this table. It is coded to: “Database Values” → “All Values From” → MyTable → MyColumn (type 1 valuelist). The valuelist returns into the dp the unique id, and displays the 10-char string. So with that in mind I should be able to pass - as the second paramter to the application.getValueListDisplayValue method - the unique id associated with the 10-char string, to get the 10-char string returned. The good news is that this works for the first 232 records in the table. The bad news is that it fails on every unique ID thereafter; returning null.

Is it possible that there is a memory issue here? Can getValueListDisplayValue only work with so many bytes before it can’t reference the display value for a real value anymore?

Puzzled…any help would be appreciated.

---

<div class="post-metadata">

### Author: ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)
#### Post date: [April 2, 2009, 6:53am UTC](https://forum.servoy.com/t/application-getvaluelistdisplayvalue-and-memory/10490/2 "2009-04-02T06:53:57Z")

</div>

Hi Jeff,

> The good news is that this works for the first 232 records in the table. The bad news is that it fails on every unique ID thereafter; returning null.

Are the records beyond #232 loaded?  
If I am not mistaken it not possible to get to a record by id when they are not loaded…

---

<div class="post-metadata">

### Author: ![jbader](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jbader](https://forum.servoy.com/u/jbader)
#### Post date: [April 2, 2009, 11:34am UTC](https://forum.servoy.com/t/application-getvaluelistdisplayvalue-and-memory/10490/3 "2009-04-02T11:34:49Z")

</div>

Hello

None of the records are loaded yet when this script runs. I also tried this on another table where the display value had fewer chars and i got 500+ records before null values

---

<div class="post-metadata">

### Author: ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)
#### Post date: [April 3, 2009, 2:05pm UTC](https://forum.servoy.com/t/application-getvaluelistdisplayvalue-and-memory/10490/4 "2009-04-03T14:05:17Z")

</div>

Jeff,

Value lists based on tables are loaded to max 500 records.  
If your table contains more rows and the sorting used (defined in the value list) is different from the order you are looping through your values you may get nulls returned earlier than with record 501.

Rob
